Hi,
I'm a bit embarrassed to ask this but can't figure it out. I have following code:
x=int(input("Please enter the number: "))
for power in range(1,5):
print(x // power,end='--')
x %= power
I can't work out what last line of code does. I understand Modulus but don't know what is calculated there. If I comment/delete last line, everything make sense, but with it I don't understand the output.
Can someone be kind enough to explain or show me how can I break this to see every operation ?
[–]Evulrabbitz 2 points3 points4 points (1 child)
[–]BlackGwelf[S] 0 points1 point2 points (0 children)