New course! Every coder should learn Generative AI!
Try a free lesson0
what is wrong whit this code?
idential block error in line 3 x=input() if x<5: print("less than 5") if 5=<x<=10: print("betwen 5 and 10") if x>10: print("more than 10)
6 Answers
+ 1
hi Amirhusein
try this...
https://code.sololearn.com/cVcRSOzEA3ur/?ref=app
the error is caused by a lack of indention, additionally “=<“ should be “<=“, thirdly you need to close the quotation mark in the final line
+ 2
1. Indentation error. (There are a lot of them). To put indentation you can use four spaces
2. In the 4th line, put <= instead of =<
3. In the 7th line put a " at the end of the string
I hope this helps Amirhusein .
Happy coding
+ 1
Define the input as an integer (int), than change =< and everything alike to <=. The last statement lacks a quote. And have an eye on the indentation they are not visible in this post
+ 1
i changed these things you said but still show me error in same line 3.
+ 1
print after "if... :" needs to be indented so adding 4 spaces (in some IDEs) might help
+ 1
i do not understand your code was similar to mine but worked i apperciate it thanks.