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

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -