+ 1
Why is a boolean of False produced rather than true?
division = ["Division","Divide","/","div"] multiplication = ["*","x","times","multiply","multiplication","multiple"] subtraction = ["-",'minus','subtract','subtraction'] addition = ['+','plus','addition','add'] root = ['root','squareroot','square root'] square = ['square','squared','power 2'] choice = input('calculation type') print(choice == (division or multiplication or subtraction or addition))
4 Respuestas
+ 4
Whenever you input the choice, the program is expecting the user to enter the entire list, not just a single element. Instead you should say something like:
if choice in division:
mode = 'd'
Or something to that effect.
+ 2
The only way to check for it in multiple lists would be to create a list of lists, I'd think.
0
is it possible to check if choice is in multiple lists?
0
THANKSSSS ILL GIVE IT A TRY LATER :D