+ 2
Python.
here... 1. for i in range(5): 2. print("hello!") in line 1 for i in range(5): prints numbers from 0 to 4. and in line 2 i also know that print("hello") prints hello. but what i dont understand is how it prints hello five times. is it because the line 2 is indented
2 ответов
+ 6
because 0,1,2,3,4 are 5 numbers, since 0 also counts (:
+ 4
Becouse range is iterete numbers from 0 to 4, and cicle for do five iterations. Function print("hello!") in a body of a cicle, and calls five times.