Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Example code of while loop in python

total = 0
num = int(input("Enter the number: "))
while num != 7:
    total = total+num
    num = int(input("Enter the number: "))
print("Sum: ", total)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Example #code #loop #python
ADD COMMENT
Topic
Name
7+2 =