+ 4

How many numbers will be printed?

i = 0 while i<10: i = i +1 if i == 7: continue print(i) The answer is 9 although I count 8, what am I missing?

8th Mar 2020, 6:03 PM
APC (Inactive for a while)
APC (Inactive for a while) - avatar
5 Réponses
+ 2
It includes all numbers from 1 to 10 (inclusive) except 7.
8th Mar 2020, 6:08 PM
Russ
Russ - avatar
+ 2
Ok, I get it
8th Mar 2020, 6:26 PM
APC (Inactive for a while)
APC (Inactive for a while) - avatar
+ 1
This program prints the numbers 1 2 3 4 5 6 8 9 10 That is count is 9 So if u want your count to be 8 just initiate i with 1(i=1)
8th Mar 2020, 6:18 PM
Ayush Kumar
- 1
what are you do
14th Mar 2020, 1:25 PM
Florin Bucsa
Florin Bucsa - avatar
- 2
hello
14th Mar 2020, 1:24 PM
Florin Bucsa
Florin Bucsa - avatar