Printing problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Printing problem

hey guys i'm having a problem. if Player.sex == "boy": print(colored("Your mother is holding you. What do you do?", 'blue')) print(colored("A: You vomit on her hands.", "red")) wait(0.5) print(colored("B: You start crying.", 'red')) wait(0.5) print(colored("C: Your mother drops you.", 'red')) Answer = input("What is your choice?: ") if Answer == 'A' or 'a': print("You chose A") elif Answer == 'B' or 'b': print("You chose B") elif Answer == 'C' or 'c': print("You chose C") else: print(colored("Your mother is holding you. What do you do?", 'magenta')) print(colored("A: You vomit on her hands.", "red")) wait(0.5) print(colored("B: You start crying.", 'red')) wait(0.5) print(colored("C: Your mother drops you.", 'red')) Answer = input("What is your choice?: ") if Answer == 'A' or 'a': print("You chose A") elif Answer == 'B' or 'b': print("You chose B") else: print("You chose C") I don't know why but when i choose 'A' for answer it prints "You chose A". That works fine. But when i choose B or C for answer it also prints "You chose A). I'm so confused. This for both boy and girl. If u need full code, i can send it

11th Aug 2019, 10:58 AM
Jordi
Jordi - avatar
2 Answers
0
Oh lmao, thank you. Can't Believe i searched 7 hours for that answer. 😂😂
11th Aug 2019, 11:06 AM
Jordi
Jordi - avatar
0
if Answer == 'A' or Answer == 'a': https://www.sololearn.com/discuss/1615887/?ref=app
11th Aug 2019, 11:06 AM
Diego
Diego - avatar