0
How to understand a code
2 Answers
+ 4
It is similar to learn a new language, for example, which is not your native language. Is not?
+ 2
You have to learn the syntax. Luckily python syntax is very easy compared to other languages.
num = 0
while num < 11:
print(num, end=' ')
num += 1
This reads:
The variable "num" is assigned the value 0.
While "num" is less than 11, print the value of "num" with the ending being a space
Add 1 to "num"
This would print:
0 1 2 3 4 5 6 7 8 9 10