Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def loading_bar_function(number):
- div_number = number // 10
- symbol = '%'
- loading_bar = ['.'] * 10
- print_bar = ""
- for num in range(len(loading_bar)):
- loading_bar.remove(loading_bar[num])
- loading_bar.insert(num, '%')
- if num == div_number-1:
- break
- string_result = ''.join(loading_bar)
- if div_number < 10:
- print(f"{number}% [{string_result}]")
- print(f'Still loading...')
- else:
- print(f'100% Complete!')
- print('[%%%%%%%%%%]')
- number = int(input())
- loading_bar_function(number)
Add Comment
Please, Sign In to add comment