[Python求助帖]有大佬能帮我看看为什么这些代码不能正常输出结果吗?
代码本意是想用来解方程,但是输出却总是无解。
程序代码:x = -100.000000
left = x+1
right = x*2
total = 0
while x<= 100.00:
mid = left - right
if left == right:
print("x = " +x+" " +mid)
total = total + 1
x = x + 0.001
if total == 0:
print("The equatioon doesn't have a solution.")
elif total == 1:
print("The equatioon only have a solution.")
else:
print("There are %d solutions in total.",total)








