我正在尝试创建一个快速程序,它将对多项式进行四次合成除法,但是当我尝试执行我的代码时,它会告诉我 R*A:无法分配给运算符。我认为这意味着它不能进行乘法运算,但为什么呢?我的编程经验有限,在 Java CompSci 中只有一年
print("This program assumes that the polynomial is to the 4th degree")
A = input('Input the first coefficient: ')
B = input('Input the second coefficient: ')
C = input('Input the third coefficient: ')
D = input('Input the fourth coefficient: ')
E = input('Input constant: ')
R = input('Input the divisor: ')
temp = 0
R*A = temp
#B + temp = temp
#R * temp = temp
#C + temp = temp
#R * temp = temp
#D + temp = temp
#R * temp = temp
#E + temp = temp
if temp == 0:
print("It works!")
else:
print("dang")
input('This is a shitty workaround for pause')