-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
552f36d
commit 5621d42
Showing
1 changed file
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
# Write a program that given two numbers as input make the main operations. | ||
|
||
# Output: | ||
# Insert first number: 4 | ||
# Insert second number: 2 | ||
|
||
# SUM: 6 | ||
# Difference: 2 | ||
# Multiplication: 8 | ||
# Division: 2 | ||
|
||
def calculator(a: float, b: float) -> None: | ||
print("SUM: ", a + b) | ||
print("Difference: ", a - b) | ||
print("Multiplication: ", a * b) | ||
print("Division: ", a / b) | ||
|
||
# Input the first number | ||
a = float(input("Insert the first number: ")) | ||
|
||
# Input the second number | ||
b = float(input("Insert the second number: ")) | ||
|
||
calculator(a, b) | ||
# Write a program that given two numbers as input make the main operations. | ||
|
||
# Output: | ||
# Insert first number: 4 | ||
# Insert second number: 2 | ||
|
||
# SUM: 6 | ||
# Difference: 2 | ||
# Multiplication: 8 | ||
# Division: 2 | ||
|
||
def calculator(a: float, b: float) -> None: | ||
print("SUM: ", a + b) | ||
print("Difference: ", a - b) | ||
print("Multiplication: ", a * b) | ||
print("Division: ", a / b) | ||
|
||
# Input the first number | ||
a = float(input("Insert the first number: ")) | ||
|
||
# Input the second number | ||
b = float(input("Insert the second number: ")) | ||
|
||
calculator(a, b) |