+ 1

why is my code showing error

my intention is to give an input number and then print the statement https://code.sololearn.com/cBAhR7N8jxR8

4th Jun 2020, 7:23 AM
Gagandeep H S
Gagandeep H S - avatar
7 odpowiedzi
+ 6
AMOGHA. A. K., there is no syntax error in the code. There is a logical issue in the if statements.
4th Jun 2020, 10:23 AM
Lothar
Lothar - avatar
+ 4
spam = 7 if spam > 5: print("five") if spam > 8: print("eight") Also post the code in description through insert code option from next time
4th Jun 2020, 7:27 AM
Abhay
Abhay - avatar
+ 1
x=int(input('enter a number\n')) if x == 5: print('five') if x<5: print('not five')
4th Jun 2020, 8:54 AM
SAN
SAN - avatar
+ 1
Please try 😊😊
4th Jun 2020, 8:54 AM
SAN
SAN - avatar
0
oh sorry here is my code: https://code.sololearn.com/cBAhR7N8jxR8
4th Jun 2020, 7:43 AM
Gagandeep H S
Gagandeep H S - avatar