Tudjewuj

KeyDevS | Video #3

Mar 31st, 2023 (edited)
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.10 KB | None | 0 0
  1. from colorama import init, Fore, Style
  2. import os
  3. import random
  4. import time
  5. init()
  6. print(f'''{Fore.LIGHTRED_EX}{Style.BRIGHT}
  7. ██████╗░██╗░░░██╗  ██╗░░██╗███████╗██╗░░░██╗██████╗░███████╗██╗░░░██╗░██████╗
  8. ██╔══██╗╚██╗░██╔╝  ██║░██╔╝██╔════╝╚██╗░██╔╝██╔══██╗██╔════╝██║░░░██║██╔════╝
  9. ██████╦╝░╚████╔╝░  █████═╝░█████╗░░░╚████╔╝░██║░░██║█████╗░░╚██╗░██╔╝╚█████╗░
  10. ██╔══██╗░░╚██╔╝░░  ██╔═██╗░██╔══╝░░░░╚██╔╝░░██║░░██║██╔══╝░░░╚████╔╝░░╚═══██╗
  11. ██████╦╝░░░██║░░░  ██║░╚██╗███████╗░░░██║░░░██████╔╝███████╗░░╚██╔╝░░██████╔╝
  12. ╚═════╝░░░░╚═╝░░░  ╚═╝░░╚═╝╚══════╝░░░╚═╝░░░╚═════╝░╚══════╝░░░╚═╝░░░╚═════╝░''')
  13. print(Style.RESET_ALL)
  14. time.sleep(2.5)
  15. bot_number = random.randint(0, 20)
  16. while True:
  17.     print(Fore.LIGHTGREEN_EX)
  18.     user_number = int(input("Введите число от одного до двадцати: "))
  19.     print(Style.RESET_ALL)
  20.     if user_number == bot_number:
  21.         print(f"{Fore.YELLOW}Вы выйграли!")
  22.         print(Style.RESET_ALL)
  23.         time.sleep(10)
  24.         break
  25.     elif user_number > bot_number:
  26.         print(f"{Fore.BLUE}Число меньше :3")
  27.         print(Style.RESET_ALL)
  28.         continue
  29.     elif user_number < bot_number:
  30.         print(f"{Fore.RED}Число больше :3")
  31.         print(Style.RESET_ALL)
  32.         continue
Advertisement
Add Comment
Please, Sign In to add comment