Skip to content

Not working in while statement #44

Description

@xyus

import random
import pyprind
random.seed(1)
collection = set()
import time
n = 100
bar = pyprind.ProgBar(n, track_time=False, title='while example')
i=0
while i < n:
r = random.randint(0, 10**5)
if r % 7 and r not in collection:
collection.add(r)
bar.update()
i=i+10
time.sleep(0.04)
The code above does not work. Please give me some advice, thanks.
while example
0% [### ] 100%

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions