Created
April 29, 2010 02:00
-
-
Save Cam1337/383020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This was written directly into git. No testing; | |
equation=raw_input("What is your equation (please use x as a variable): ") | |
lookfor=raw_input("Factor Number (leave blank for 0): ") | |
for x in range(1000): | |
equation=equation.replace("^","**") | |
answer=eval(equation) | |
if answer==lookfor: | |
print "The answer was %s" % x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment