0

How to use "AND" "OR" in Python's input function?

This is error why? A = input("Enter 1 neighbouring planet of earth") if A =="Venus" or "Mars": print ("Congratulations you are right") else: print("Sorry you are wrong")

29th Sep 2019, 3:16 AM
Madan Timilsina
Madan Timilsina - avatar
3 Respuestas
+ 2
if A =="Venus" or A=="Mars":
29th Sep 2019, 3:41 AM
Choe
Choe - avatar
+ 9
There’s a correction in if statement:- if A==“Venus” or A==“Mars”:
29th Sep 2019, 4:47 AM
Mohamed Arshad
Mohamed Arshad - avatar
+ 1
Really? I’ve ran this program successfully...
29th Sep 2019, 4:45 AM
EagleArisriver
EagleArisriver - avatar