Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@
# Multiplication: 8
# Division: 2
#

def operazioni(a, b):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aggiungi i tipi

print("Somma:", a + b)
print("Differenza:", a - b)
print("Prodotto:", a * b)
if (b == 0):
print("Divisione non possibile. Il divisore è 0.")
else:
print("Divisione:", a / b)

a = int(input("Inserisci il primo numero: "))
b = int(input("Inserisci il secondo numero: "))
operazioni(a, b)
Loading