How to add a progress bar in python? -


i've been asked make 'privilege checker' , far coming along pretty well. here code:

def privilige():      print("welcome privilege checker v0.011")      print("would check privileges?")      answer = input("type 'yes' or 'no' , hit enter ('y', 'y', 'n', or 'n' valid choices).")      print("checking priviliges.")      if answer == "yes" or answer == "yes" or answer == "y" or answer == 'y':          print("privileges: checked")      elif answer == "no" or answer == "no" or answer == 'n' or answer == 'n':          print("privileges: unchecked.")      else:           print("please enter valid option.") privilige() 

now, in between print("checking privileges.") , if answer == "yes" add progress bar uses character, "█" possible? appreciated, thanks!

you try this:

from time import sleep  in range(60):  # change number make longer or shorter.     print('█', end='')     sleep(0.1)  # change number make faster or slower. 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -