# initialize important data
jugCurrentVolume = 0
# ask user for jug capacity
jugCapacity = input("Enter jug capacity: ")
# ask user for tube capacity
tubeCapacity = input("Enter tube capacity: ")
# while there is still space for another tube
while (jugCurrentVolume + tubeCapacity <= jugCapacity):
# pour water in
jugCurrentVolume = jugCurrentVolume + tubeCapacity
# tell user I poured and the amount inside jug
print("Jug has %dmL now" % (jugCurrentVolume))
# if jug is filled
if (jugCurrentVolume == jugCapacity):
# tell user rock and roll
print("Rock n Roll")
# or else
else:
# tell user the amount of space left
print("Jug have %dmL left" % (jugCapacity - jugCurrentVolume))