+ 2

I am not getting correct output..😪 Can anyone help me ??... Check my code....

https://code.sololearn.com/cvYaYEoComxc/?ref=app

12th Jan 2022, 5:28 AM
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱 - avatar
5 odpowiedzi
+ 5
if s[0] in "Aa": # pass else: # fail
12th Jan 2022, 5:31 AM
Ipang
+ 4
if s[0] in "Aa": # or if s[0] == 'a' or s[0] == 'A':
12th Jan 2022, 5:36 AM
SoloProg
SoloProg - avatar
+ 3
https://docs.python.org/3/reference/expressions.html#operator-precedence In your code, the precedence of '==' is higher than 'or'. if s[0] == 'a' or 'A' equals if (s[0] == 'a') or ('A')
12th Jan 2022, 5:37 AM
FanYu
FanYu - avatar
+ 2
Ipang Thanks.....😀
12th Jan 2022, 5:32 AM
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱 - avatar
+ 2
SoloProg Thanks...🙂
12th Jan 2022, 5:37 AM
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱
𝑺𝑯𝑼𝑩𝑯𝑨𝑴 𝑹𝑨𝑱 - avatar