+ 2
I don't understand
What does this code do? for i in range(10): if not i % 2 == 0: print(i+1) ----- ------ ------ can anyone explain it
3 odpowiedzi
+ 12
loop will run from 0 to 9 ... , condition true for 1,3,5,7,9
//so output will be 2,4,6,8,10 as we are printing these above numbers by adding 1 to them
+ 9
print: 2, 4, 6, 8, 10