Geocrack

loading

Jun 27th, 2022 (edited)
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import time
  2.  
  3. def progress_bar(percent, bar_length=50):
  4.     hashes = '#' * int(percent / 100 * bar_length)
  5.     spaces = ' ' * (bar_length - len(hashes))
  6.     print(f'\r{hashes} {spaces} {percent}% ', end='')
  7.     time.sleep(0.02)
  8.  
  9. def main():
  10.     print("Hello World")
  11.  
  12.     for i in range(101):
  13.         progress_bar(i)
  14.  
  15. if __name__ == '__main__':
  16.     main()
  17.  
Advertisement
Add Comment
Please, Sign In to add comment