Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- name = input("Ваше имя? \n")
- balance = 100
- while True:
- choice = input("Вы хотите сыграть в Рулетку или в Кубик?\n")
- if choice == "Рулетку":
- spent = int(input("Сколько вы хотите поставить?\n"))
- chance = random.randint(-spent,spent)
- if balance > spent or balance == spent:
- balance += chance
- print("Ваш баланс теперь:",balance)
- if balance <0:
- print("Ты банкрот! игра окончена...")
- quit()
- if choice == "Кубик":
- ghg = input("Введите сторону кубика: \n")
- chc = random.randint(1,6)
- if ghg == chc:
- print("Вы выиграли 500 !!!")
- balance += 500
- elif ghg != chc:
- print("Вы проиграли и мы забираем 50 ")
- balance -= 50
- print("Ваш баланс теперь:",balance)
- if balance < 0:
- print("Ты банкрот! игра окончена...")
- quit()
- class People:
- def __init__(self,name,balance):
- self.name = name
- self.balance = balance
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement