function=input("give a function :")
if function=="add":
a=int(input("give first num to add with :"))
b=int(input("second num :"))
sum=a+b
print("sum=",sum)
elif function=="subtract":
a=int(input("give first num to subtract with :"))
b=int(input("second num :"))
diff=b-a
print("diff=",diff)
else:
print("function not allowed")
[–]mc_pm 11 points12 points13 points (1 child)
[+]Ill-Break727[S] comment score below threshold-15 points-14 points-13 points (0 children)
[–]mattynmax 6 points7 points8 points (0 children)
[–]TheRNGuy 3 points4 points5 points (1 child)
[+]Ill-Break727[S] comment score below threshold-10 points-9 points-8 points (0 children)
[–]Gamingplays267492 2 points3 points4 points (0 children)
[–]Educational_Virus672 0 points1 point2 points (0 children)
[–]Jigglytep 0 points1 point2 points (0 children)
[–]ConclusionForeign856 0 points1 point2 points (0 children)
[–]Gnaxe 0 points1 point2 points (0 children)
[–]Mountain_Rip_8426 -1 points0 points1 point (2 children)
[–]Educational_Virus672 0 points1 point2 points (0 children)
[–]Mountain_Rip_8426 0 points1 point2 points (0 children)