How to fix indentation errors? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to fix indentation errors?

password = input() repeat = input() def validate(text1, text2): if text1 == text2 : print("Correct") else: print("Wrong") def validate(password , repeat)

29th Aug 2020, 9:34 PM
Aman kumar
Aman kumar - avatar
3 Answers
+ 3
Remove all the spaces before the first if statement then add one tab Also when you call the function don't use def password = input() repeat = input() def validate(text1, text2): if text1 == text2 : print("Correct") else: print("Wrong") validate(password , repeat)
29th Aug 2020, 9:41 PM
Ruba Kh
Ruba Kh - avatar
+ 3
You might also want to read this general explanation (don't run it) of indentation: https://code.sololearn.com/cT5BRIbkia21/?ref=app
29th Aug 2020, 11:25 PM
HonFu
HonFu - avatar
29th Aug 2020, 9:45 PM
Tomiwa Joseph
Tomiwa Joseph - avatar