ive come across a display error. Here is my code
onerot = 0
if outerball.pos.x >= (self.r - 0.1):
if self.rotations == 0:
stopt = time.time ( )
onerot = stopt - startt
print(onerot)
self.rotations += 1
# update variable outputs
timey.text = "time: %1.f" % onerot + " seconds"
timex.text = "time: %1.f" % self.t + " seconds"
nmrRotations.text = "rotations: %1.f" % self.rotations
can someone explain how to replace the value of the calculated "onerot" variable in the if statement and replace it with the value of 0 with the onerot variable outside the if statement image shows Onerot value as 0 and the other variables updating
thanks