+ 7

yard =int(input()) if (yard>=10): print("High five") elif(yard==0): print("shh") elif(yard>1)and (yard<10): print("Ra!"*yard)

What's the wrong

21st May 2021, 4:04 AM
Chandu187
Chandu187 - avatar
12 odpowiedzi
+ 18
Check the condition again yard =int(input()) if (yard>10): print("High Five") elif(yard<1): print("shh") elif(yard>=1)and (yard<=10): print("Ra!"*yard) Chandu187 also, f should be uppercase in `High Five` Akash Prasad it's a code coach challenge https://www.sololearn.com/coach/20?ref=app Hope you know python is a case sensitive language :)
21st May 2021, 4:11 AM
Simba
Simba - avatar
+ 5
Little reminder that the title isn't the correct place for code and that the tags are used to identify the question. You can also link code from the code playground to make it easier for other to check out your code.
21st May 2021, 3:02 PM
Apollo-Roboto
Apollo-Roboto - avatar
+ 3
y=int(input()) if y<=0 : print("shh") elif y>=1 and y<=10 : print ("Ra!"*y) elif y>10 : print ("High Five") Shh is for not any yard =0 Ra! is for more than one 1 and less than 10 High five is for more than 10 yard
22nd May 2021, 6:07 AM
Akash Kawale
+ 2
num_of_yard = int(input()) if (num_of_yard > 10): print("High Five") elif (num_of_yard < 1): print("shh") else: print(num_of_yard * "Ra!")
22nd May 2021, 9:18 AM
Apongpoh Gilbert
Apongpoh Gilbert - avatar
+ 2
yard==0 is a Boolean comparison and should not be used for integer comparison 🌻
22nd May 2021, 12:40 PM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Space 🌌
22nd May 2021, 6:34 PM
Dmitry Rudakov
Dmitry Rudakov - avatar
+ 1
Simba why F not f it should matter because H is there
21st May 2021, 2:27 PM
Akash Prasad
Akash Prasad - avatar
+ 1
Simba yes i know python is case sensitive but print statement should print the word whatever we want to print
21st May 2021, 2:52 PM
Akash Prasad
Akash Prasad - avatar
0
In the string "High five", you have to type "five" in uppercase.
22nd May 2021, 9:20 PM
6hpxq9
6hpxq9 - avatar
23rd May 2021, 7:06 AM
Sadra Shakouri
Sadra Shakouri - avatar
- 2
Hello
22nd May 2021, 5:21 PM
Abu Usmanov
Abu Usmanov - avatar
- 3
Line 6 should be : elif((yard>1)and(yard<10)):
21st May 2021, 3:28 PM
mali