+ 2

Gotham city with python

criminals = int(input()) if (criminals < 5): print("'I got this!'") elif (criminals >= 5 and <= 10): print("'Help me Batman'") else: print("'Good Luck out there!'") I cannot find why i always get syntax error at elif

5th Mar 2020, 10:49 AM
MasterWinZ
MasterWinZ - avatar
6 Respuestas
+ 2
After "and" write: criminals<=10
5th Mar 2020, 10:52 AM
_yaroslavv [online_everyday]
_yaroslavv [online_everyday] - avatar
+ 1
Now it work thank
5th Mar 2020, 10:56 AM
MasterWinZ
MasterWinZ - avatar
+ 1
Gotham city with python criminals = int(input()) if (criminals < 5): print("'I got this!'") elif (criminals >= 5 and <= 10): print("'Help me Batman'") else: print("'Good Luck out there!'") I cannot find why i always get syntax error at elif
10th Sep 2021, 5:38 PM
Chandramouli
Chandramouli - avatar
+ 1
criminals=int(input()) if criminals <5: print('I got this') elif criminals >=5 and criminals <=10: print ('Help me Batman') else: print('Good Luck out there !') // Why I'm not getting answer in sololearn and the answer getting in another python 3 editer ?
30th Jul 2022, 9:26 AM
Shiva Kumar
Shiva Kumar - avatar
0
Why do you use double " and ' ?) criminals = int(input()) if (criminals < 5): print('I got this!') elif (criminals >= 5 and criminals <=10): print('Help me Batman') else: print('Good Luck out there!')
23rd Jul 2021, 2:39 PM
ጠ Ø λ 千 ₳ ℝ
ጠ Ø λ 千 ₳ ℝ - avatar
0
p = int(input()) def batman (p): if p > 10: return ('Good Luck out there!') elif p < 5 : return ('I got this!') elif p >=5 and p <=10: return ('Help me Batman') print (batman(p))
10th Jul 2022, 12:33 PM
Eugene Nester
Eugene Nester - avatar