Sep-29-2018, 07:36 PM
Hi guys! given that I'm new to Python and coding in general ...
I have the following code, every 5 seconds I want to print Rysource +100, but the output, as you can see, is printed double:
1000
1100
1100
1200
1200
1300
1300
1400
Basically it starts with: 1000,1100. After 5 seconds prints: 1100,1200. After 5 seconds prints: 1200,1300
And so on...
How can i print something like this:
OUTPUT:
1000
1100
1200
1300
1400
I hope this is clear and thank you
I have the following code, every 5 seconds I want to print Rysource +100, but the output, as you can see, is printed double:
import time Rysource = 1000 while True: for Rysource in range(Rysource, Rysource+101, 100): print(Rysource) time.sleep(5)OUTPUT:
1000
1100
1100
1200
1200
1300
1300
1400
Basically it starts with: 1000,1100. After 5 seconds prints: 1100,1200. After 5 seconds prints: 1200,1300
And so on...
How can i print something like this:
OUTPUT:
1000
1100
1200
1300
1400
I hope this is clear and thank you