How to understand where is the error? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to understand where is the error?

i = 15 for i in range(1,5): while(i<3): print("hi") i+ = 1 continue print(i) pass print(i)

24th Jul 2021, 12:23 PM
Swapna Jha
Swapna Jha - avatar
2 Answers
+ 3
Debugging line by line and check the output....that's it
24th Jul 2021, 12:34 PM
Naveen Rathore
Naveen Rathore - avatar
+ 2
Swapna Jha Just see the error and understand it and solve it step by step. Error maybe come in different case in python like: 1 - Indentation problem 2 - syntax error 3 - logical error 4 - grammatical error. As I can see in your code there is Indentation problem and also incorrect use of += also doens't make sense to use of continue and pass here.
24th Jul 2021, 6:48 PM
A͢J
A͢J - avatar