Friday, June 28, 2019

while loop in python

n = 0
while n < 10:
    print(n)
    n = n + 3



output:

0
3
6
9



while True:
    print("Hello")

output :
helloworld

prints continuously

No comments:

Post a Comment

python class topic video