Write python program that calculates the sum of 5 numbers. Then draw a flowchart for it
All Answers
need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer
solution using while loop:
print("Welcome, this program calculates the sum of Five numbers.")
n=0
counter=1
while counter<=5:
n=n+int(input("enter the number"))
counter=counter+1
print("The sum of the five numbers is: ",n)
need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer
print("Welcome, this program calculates the sum of Five numbers.")
n=int(input("enter number"))
n=n+int(input("enter number"))
n=n+int(input("enter number"))
n=n+int(input("enter number"))
n=n+int(input("enter number"))
print(n)
need an explanation for this answer? contact us directly to get an explanation for this answer
total answers (3)