Advertisement
Guest User

Love this two

a guest
Feb 27th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. import random
  2. name = input("Ваше имя? \n")
  3. balance = 100
  4. while True:
  5. choice = input("Вы хотите сыграть в Рулетку или в Кубик?\n")
  6. if choice == "Рулетку":
  7. spent = int(input("Сколько вы хотите поставить?\n"))
  8. chance = random.randint(-spent,spent)
  9. if balance > spent or balance == spent:
  10. balance += chance
  11. print("Ваш баланс теперь:",balance)
  12. if balance <0:
  13. print("Ты банкрот! игра окончена...")
  14. quit()
  15. if choice == "Кубик":
  16. ghg = input("Введите сторону кубика: \n")
  17. chc = random.randint(1,6)
  18. if ghg == chc:
  19. print("Вы выиграли 500 !!!")
  20. balance += 500
  21. elif ghg != chc:
  22. print("Вы проиграли и мы забираем 50 ")
  23. balance -= 50
  24. print("Ваш баланс теперь:",balance)
  25. if balance < 0:
  26. print("Ты банкрот! игра окончена...")
  27. quit()
  28.  
  29.  
  30.  
  31.  
  32. class People:
  33. def __init__(self,name,balance):
  34. self.name = name
  35. self.balance = balance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement