-
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.
Created a new file named calculator.py
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
x = input("Enter the first number: ") | ||
y = input("Enter the second number: ") | ||
|
||
print("\nThe sum is:",int(x) + int(y)) | ||
print("The difference is:", int(x)- int(y)) | ||
print("The multiplication is: ", int(x) * int(y)) | ||
print("The division is: ", float(x)/float(y)) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
print("Insert the first number:") | ||
x:int = input() | ||
|
||
print("Insert the second number") | ||
y = input() | ||
|
||
z:int = x + y | ||
|
||
print("Sum is", z ) |