The Sorrow Posted October 7, 2010 Share Posted October 7, 2010 (edited) I wanted to know how to edit this code to make it loop back to the beginning. Its just a number comparison. num1 = 0 num2 = 0 print "Hello, im a number comparison program " num1 = input("Enter a number ") num2 = input("Enter another number ") if (num1 > num2): print "Your first number is greater" if (num2 > num1): print "Your second number is greater" if (num1 == num2): print "Your numbers are equal" here is how i want to finish it in pseudo-code: "Enter another? (Yes or No) > " if yes loop to beginning if no print "Goodbye :)" any help? Edited October 7, 2010 by The Sorrow Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.