Write a while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed the loop should ask the user if he or she wishes to perform the operation again.if so, the loop should repeat,otherwise it should terminate.

Respuesta :

int repeat = 'y'
while repeat =='y' :
num1= int(input("Enter first number: "))
num2= int(input("Enter second number: "))
sum = num1+num2
print ("The sum is : "+str(sum))
repeat =int(input("Try another? (y/n) "))

In this exercise we have to use the knowledge of computational language in Python, so we have that code is:

It can be found in the attached image.

So, to make it easier, the code in Python can be found below:

int repeat = 'y'

while repeat =='y' :

num1= int(input("Enter first number: "))

num2= int(input("Enter second number: "))

sum = num1+num2

print ("The sum is : "+str(sum))

repeat =int(input("Try another? (y/n) "))

See more about python at brainly.com/question/26104476

Ver imagen lhmarianateixeira