Enter a number and then enter an other number add these numbers together and then ask if they want to add another number if they enter y ask them to enter number and keep add the number unitl the answer is N.
once the loop has been stopped , Display the total.
Thank you in advance.
Well below is my code/
once the loop has been stopped , Display the total.
Thank you in advance.
Well below is my code/
num=int(input("enter a number: "))
total=num
again="y"
while again=="y":
n=int(input("enter a another number: "))
total=total+n
nu=input("do you want to add a another number? (y/n) : ")
print("total is....",total)
else:
print("total is",total)
break
