+ 1
Only one test case gives wrong and the others are correct can u tell me why?
n= int(input()) if n>=10: print ("High Five") elif n<1: print ("shh") elif n>1 and n<10: print (n*"Ra!")
6 Antworten
+ 2
You should use a loop to print Ra, n*Ra doesn't work I think. Try it with using a loop and see what will happen.
I hope, it helps.
Happy coding!
+ 2
Gehad Adel "High Five" for greater than 10 not for 10.
Remove '=' from line 2 and add it in 6th line like "elif n>1 and n<=10"
+ 2
Check your conditions :
high five for over 10 not =, and for Ra! <= 10.
+ 2
Gehad Adel
In your code the bounds are n>1 and n<10, but it must be, n>=1 and n<=10 also you should use a loop, then it must be okay!
Try this!
n= int(input())
if n>10:
print ("High Five")
elif n<1:
print ("shh")
elif n>=1 and n<=10:
while n != 0:
print("Ra!")
0
It doesn't work !
0
#Angela
This the right answer thank u
Thanks for all.