何が悪いのかわからない。左側に x*x 、右側に 25 を入力すると、機能しません。Python シェルにはエラーは表示されませんが、ソリューションの量を入力しても何も起こりません。無限ループになっているか、各実行後に x を適用していない可能性があると思います。助けてください!これが私のコードです:
#getting input information
print
print "This program cannot solve for irrational or repeating numbers. Please round for them in your equation."
print
print "Make the variable in your equation stand for x"
print
startingLimit=int(raw_input("What is the lowest estimate that your variable could possibly be?"))
print
wholeNumber=raw_input("Do you know if your variable will be a whole number or a fraction? Answer: yes/no")
if (wholeNumber== "yes"):
print
fraction= raw_input("Is it a decimal/fraction? Answer:yes/no")
if (fraction=="yes"):
print
print "This program will only calculate up to the fourth place to the right of the decimal"
xfinder=0.0001
else:
xfinder=1
else:
xfinder=0.0001
x=0
leftEquation=raw_input("Enter your left side of the equation:")
print
rightEquation=raw_input("Enter the right side of the equation:")
print
amountSolutions=raw_input("How many solutions are there to your equation? (up to 20)")
#solving
indivisualCount=0
count=0
x=startingLimit
while (count!=amountSolutions):
while (count==0):
ifstuffleft=eval(leftEquation)
ifstuffright=eval (rightEquation)
if (ifstuffleft!=ifstuffright):
x=x+xfinder
else:
a=x
count=count+1