It will not indent my code after an if statement (python) | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

It will not indent my code after an if statement (python)

When i write code and use an if statement, it will not indent my code and will start on a new line instead, eg: Age = int(input)) If age > 18: Print(“over 18”) It doesn’t indent before the next line, im not very good at python but what do i do?

30th Mar 2021, 5:05 PM
Dacleary
Dacleary - avatar
3 Réponses
+ 2
press tab in the bottom if you use code playground. or press space four times.
30th Mar 2021, 5:10 PM
Dino Wun (Use the search bar plz!)
Dino Wun (Use the search bar plz!) - avatar
+ 1
Statement if with low case and print same space in forward
30th Mar 2021, 5:13 PM
Илья Мирошник
Илья Мирошник - avatar
+ 1
Make a return after the if statement and use the backspace afterwards. It should help you out of the mess in the editor. I have tried that before too. It's probably a bunch of hidden characters that create the mess in the editor.
30th Mar 2021, 5:32 PM
Jan
Jan - avatar