While loop exercise Print all numbers from 0 up to, but not including, 10
Jump to turn (7)
- 1While loop exercise Print all numbers from 0 up to, but not including, 10
- 2use python
- 30 to 100 # if x is divisible by 3, print fizz # if x is divisible by 5, print bu
- 40 to 100 if x is divisible by 3, print fizz if x is divisible by 5, print buzz i
- 5find the factor of 155680922162, 1203182 8 x =155680922162, find x in python
- 6find the factor of 155680922162, 1203182 x =155680922162, find x in python
- 7use while loop
- User
While loop exercise
Print all numbers from 0 up to, but not including, 10
- Assistant
i = 0 while i < 10: print(i) i += 1
- User
use python
- Assistant
Here's the Python code to print all numbers from 0 up to, but not including, 10 using a while loop:
pythoni = 0 while i < 10: print(i) i += 1