Answer:
# Here we are asking the user for a number two times
userInput1 = input("Enter any #: ")
userInput2 = input("Enter any # again: ")
# We compare if userInput1 is greater than userInput2
if(userInput1 > userInput2):
# Print userInput1 if userInput1 is greather than userInput2
print("First Number: " + userInput1)
# Otherwise, print userInput2
else:
print("Second Number: " + userInput2)
# Initiate a while-loop
while(True):
# The lines below are from above
userInput1 = input("\nEnter any #: ")
userInput2 = input("Enter any # again: ")
if(userInput1 > userInput2):
print("First Number: " + userInput1)
else:
print("Second Number: " + userInput2)
# We ask the user whether they would like to stop
stop = input("\nWould you like to stop? (Yes or No)")
# Compare the String stop with "Yes"
if(stop == "Yes"):
# If true then break
break
Explanation:
The use of \n is unnecesary, but it skips a line and provides more readability.