I am not sure why this code is not working as supposed, can any one help me please ?
# check if a user eligible for watching coco movie or not.
# if user name starts with "a" or "A" and his age is greater then 10 then he can, else not.
user_name = input("please enter your name in letters here: ")
user_age = int(input("please enter your age in whole numbers here: "))
if user_name[0] == ("a" or "A") and user_age > 10 :
print("you can watch coco movie")
else:
print("sorry, you cannot watch coco")
I tested this code with every possible condition and it is working fine but with last condition is not working as supposed , in last condition don't know why condition is False.
I am pasting here all tested conditions and there results from IDLE :
please enter your name in letters here: a
please enter your age in whole numbers here: 9
sorry, you cannot watch coco
>>>
====================== RESTART: D:\MyPythonScripts\1.py ======================
please enter your name in letters here: a
please enter your age in whole numbers here: 10
sorry, you cannot watch coco
>>>
====================== RESTART: D:\MyPythonScripts\1.py ======================
please enter your name in letters here: a
please enter your age in whole numbers here: 11
you can watch coco movie
>>>
====================== RESTART: D:\MyPythonScripts\1.py ======================
please enter your name in letters here: A
please enter your age in whole numbers here: 9
sorry, you cannot watch coco
>>>
====================== RESTART: D:\MyPythonScripts\1.py ======================
please enter your name in letters here: A
please enter your age in whole numbers here: 10
sorry, you cannot watch coco
>>>
====================== RESTART: D:\MyPythonScripts\1.py ======================
please enter your name in letters here: A
please enter your age in whole numbers here: 11
sorry, you cannot watch coco
>>>