You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ThePyProgrammer edited this page Jun 23, 2022
·
2 revisions
So the answer to today's homework was:
operator=input("What is your operation? (+,-,*,/): ")
num1=float(input("What is your first number? : "))
num2=float(input("What is your second number? : "))
ifoperator=="+":
output=num1+num2elifoperator=="-":
output=num1-num2elifoperator=="*":
output=num1*num2else:
output=num1/num2print("The output of this operation is", str(output)+".")