Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected twice output
#3
I'm really unclear on what you are trying to do beyond printing numbers in steps of 100 from a start point ... until you get bored and stop it. What the self referencing for loop is for, I have no idea.

What's wrong with:

from time import sleep
Rysource = 1000
large_number = 9999
 
for counter in range(Rysource, large_number, 100):
    print(counter)
    sleep(5)

If you really want it to go on for ever ... use a while loop, rather than a specific range in a for loop:

from time import sleep
Rysource = 1000
 
while True:
    print(Rysource)
    Rysource += 100
    sleep(5)
I am trying to help you, really, even if it doesn't always seem that way
Reply


Messages In This Thread
Unexpected twice output - by Samo - Sep-29-2018, 07:36 PM
RE: Unexpected twice output - by buran - Sep-29-2018, 08:13 PM
RE: Unexpected twice output - by gruntfutuk - Sep-29-2018, 08:43 PM
RE: Unexpected twice output - by Samo - Sep-29-2018, 10:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unexpected output Starter 2 584 Nov-22-2023, 12:08 AM
Last Post: Starter
  Unexpected Output - Python Dataframes: Filtering based on Overlapping Dates Xensor 5 863 Nov-15-2023, 06:54 PM
Last Post: deanhystad
  Unexpected output while using random.randint with def terickson2367 1 599 Oct-24-2023, 05:56 AM
Last Post: buran
  Unexpected output from df.loc when indexing by label idratherbecoding 6 1,333 Apr-19-2023, 12:11 AM
Last Post: deanhystad
  unexpected output asyrafcc99 0 1,543 Oct-24-2020, 02:40 PM
Last Post: asyrafcc99
  Unexpected output: symbols for derivative not being displayed saucerdesigner 0 2,116 Jun-22-2020, 10:06 PM
Last Post: saucerdesigner
  Unexpected output palladium 4 2,852 Jan-11-2020, 03:26 PM
Last Post: palladium
  Unexpected output: if statement CabbageMan 1 1,826 Sep-04-2019, 04:12 PM
Last Post: ThomasL
  Unexpected Output using classes and inheritance langley 2 2,020 Jul-04-2019, 09:33 AM
Last Post: langley
  float multiplication - unexpected output inesk 3 3,431 Dec-11-2018, 10:59 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020