Skip to content
Open
Changes from all commits
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
16 changes: 13 additions & 3 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,21 @@ def multiply(num1, num2):
def divide(num1, num2):
return num1 / num2


# Function to divide two numbers
def left_over(num1, num2):
return num1 % num2

print("Please select operation -\n" \
"1. Add\n" \
"2. Subtract\n" \
"3. Multiply\n" \
"4. Divide\n")
"4. Divide\n"
"4. Left_Over\n")


# Take input from the user
select = int(input("Select operations form 1, 2, 3, 4 :"))
select = int(input("Select operations form 1, 2, 3, 4 ,5 :"))

number_1 = int(input("Enter first number: "))
number_2 = int(input("Enter second number: "))
Expand All @@ -44,5 +50,9 @@ def divide(num1, num2):
elif select == 4:
print(number_1, "/", number_2, "=",
divide(number_1, number_2))

elif select == 5:
print(number_1, "%", number_2, "=",
left_over(number_1, number_2))
else:
print("Invalid input")
print("Invalid input")