Python’s print command only solves the first math problem out of multiple. print(a+50, a/2)=50, 0.0

a=0.0
b=0.0
c=0.0
d=0.0
a1=0.0
b1=0.0
c1=0.0
d1=0.0
z=0.0

print(50/2)
print(a+50.0, a/2.0)

the print(50/2) works, it gives 25. but the print(a+50, a/2) gives 50, 0.0 Why isn’t it saying 50, 25?

Answer

This is because a = 0.0, and 0.0 / 2 = 0 The print a+50 won’t actually change the value of a.