Hello I'm making a random program and right now I have it asking a user if they want to add, subtract, multiply, or divide and that's going well but the if statement wont go through all the options. Whatever is in the first of the nested if statement is what the function preforms. Here's the code:
#Test2.py
import random
x = input("Hello what is the issue? ").capitalize()
if x == "Can't decide what to do":
y = input("How many choices are there? (please type as numbers in a row) ")
yl = list(y)
print("Number ", random.choice(yl) ," is your choice.")
elif x == "I need help with math":
m = input("Okay, are you adding, subtracting, multiplying, dividing, or something else? ").capitalize()
if m == "Adding" or "Add" or "Addition":
q = input("Okay what is the first number? ")
w = input("What is the second number? ")
r = input("Enter the third number: (if there isnt another number please enter 0)")
t = input("Enter the fourth number: (if there isnt another number please enter 0) ")
u = input("Enter the fifth number: (if there isnt another number please enter 0) ")
m1 = int(q)+int(w)+int(r)+int(t)+int(u)
print("The answer is: ", m1)
elif m == "Subtracting" or "Subtract" or "Subtraction":
i = input("Okay what is the first number? ")
o = input("What is the second number? ")
p = input("Enter the third number: (if there isnt another number please enter 0) ")
a = input("Enter the fourth number: (if there isnt another number please enter 0) ")
s = input("Enter the fifth number: (if there isnt another number please enter 0) ")
m2 = float(i) - float(o) - float(p) - float(a) - float(s)
print("The answer is: ", m2)
elif m == "Multiplying" or "Multiply" or "Multiplication":
d = input("Okay what is the first number? ")
f = input("What is the second number? ")
g = input("Enter the third number: (if there isnt another number please enter 1) ")
h = input("Enter the fourth number: (if there isnt another number please enter 1) ")
j = input("Enter the fifth number: (if there isnt another number please enter 1) ")
m3 = float(d) * float(f) * float(g) * float(h) * float(j)
print("The answer is: ", m3)
elif m == "Dividing" or "Divide" or "Division":
k = input("Okay what is the first number? ")
l = input("What is the second number? ")
z = input("Enter the third number: (if there isnt another number please enter 1) ")
x = input("Enter the fourth number: (if there isnt another number please enter 1) ")
c = input("Enter the fifth number: (if there isnt another number please enter 1) ")
m4 = float(k)%float(l)%float(z)%float(x)%float(c)
print("The answer is: ", m4)
else:
quit
Thank you for any and all help, have a great day!