![]() |
#2
wp2319572020-05-03 13:28
|

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)
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)
只有本站会员才能查看附件,请 登录