New course! Every coder should learn Generative AI!
Try a free lesson+ 14
Gotham city challenge, I have problem with the code, I type but still return error
c=int(input()) If c<5: print ('i got this!') elif 4<c<11: print ('Help me Batman!') else: print ('Goodluck out there!')
50 Answers
+ 6
Give me 5 upvotes plz 🙏
+ 5
Try in the elif statement, spreading it out by using "and"
elif c > 4 and c < 11:
+ 5
Makayla Harries Q/A section is for discussion and clearing your doubts. What you are doing is pure spam. don't do it
+ 3
Just remove the extra !
+ 3
#if stament has to in lower case
c=int(input())
if c<5:
print ('i got this!')
elif 4<c<11:
print ('Help me Batman!')
else:
print ('Goodluck out')
+ 2
c=int(input(:))
if c<5:
print("I got this!")
elif 4<c&&c<11:
print("Help me Batman!")
else:
print("Good luck out there!")
#try that i think it can solve your problem
+ 2
U hv to write If in small letter that is (if)
+ 1
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 youre right its definitely not. I just checked mine and I used all "if statements" as well
+ 1
Thanks Kiibo, it works. The output must be exactly as what they expected. I got it now. Thanks much
+ 1
Oooh nice
+ 1
The expression should be inside the parentheses ()
Also, the second expression should be elif(c>=5 and c<=10):
+ 1
If its python.
If needs to be if(lowercase)
and instead of 4<c<11 write
elif 4>c and(||) c<11
And if the c is not in between those values it will say error(else will execute in this case)
+ 1
,😄✌️
+ 1
n=int(input())
if n<5:
print("I got this!")
elif n>=5 and n<=10:
print('Help me Batman')
else:print("Good Luck out there!")
Just copy paste this...👍.
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥
It's capital
0
Thanks so much all. Really appreciate
0
Guys am still having issue with the first line of code as follows
c= int(input())
The 'int' and 'output' are not coming out as function. What should I do pls
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥
I'm not talking about the 'if', I'm saying about the print statement which that 'if' condition will print. Since you are running that code in code coach they want you to execute the code according to there norms...
0
OK, how am I gonna do then