0

My code keeps saying error

Im New to coding and I've been trying but this particular code isn't working great https://sololearn.com/compiler-playground/ctSqMkysoo15/?ref=app

4th Jan 2025, 4:21 PM
Adetula Daniel
Adetula Daniel - avatar
4 odpowiedzi
+ 5
Adetula Daniel , just a comment from me: indentation with just 1 space has not a good readability. > it is recommended by the python style guide (PEP 8) to use 4 spaces for each indentation level. > by using the sololearn playground, there is a `Tab` key placed in the playgrounds toolbar at the very left side. this creates a proper indentation as mentioned.
4th Jan 2025, 8:55 PM
Lothar
Lothar - avatar
+ 4
Adetula Daniel You are forgetting the colon ' : ' at the end of all the conditions
4th Jan 2025, 5:16 PM
BroFar
BroFar - avatar
+ 1
SyntaxError: invalid syntax try using a correct syntax: if (something): do this elif (something else): do this else: do this
4th Jan 2025, 4:45 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
+ 1
Thank you
5th Jan 2025, 6:34 PM
Adetula Daniel
Adetula Daniel - avatar