Whileloop Statement

Code and Output

whilestatement
count = 0
while (count < 9):
print ("The count is:", count)
count = count + 1
print ("Good Bye!")

infiniteloopstatement
var = 1
while var == 1 : #This construct an infinite loop
num = input("Enter a number :")
print ("You entered: ", num)
print ("Good bye!")


Comments

Popular posts from this blog

Data Validation

WDD - LO1 - MANAGE SECURE SITES