0
Question in Python with if / elif statements
Now the question ... when entering any thing to the "name" it just runs the first if statement or any "or" statement available .Still a beginner . That's the code : print("Welcome to our first miniprogramm !!!") name = input("Enter your name please : ") if name == "Ecco" or "ecco" or "Neon" or "neon" : print ("Hello Ranger 1 !!") elif name == "Ranger" or "ranger" : print("Hello Ranger 2 !!") elif name == "Zeon" or "zeon" : print("Hello Ranger 3 !!") else: print("You are not auser Sir.") print("") print("Programm ended.")
1 Answer
+ 4
Check this link, same mistake:
https://www.sololearn.com/Discuss/2140582/?ref=app