+ 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
6 odpowiedzi
+ 2
After "and" write: criminals<=10
+ 1
Now it work thank
+ 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
+ 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 ?
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!')
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))