Я работаю над игрой-монеткой, которая добавляет ваше введенное значение к вашему балансу
Фрагменты кода из ранее:
deposit = input("Enter how much to deposit")
money = file1.read()
resultmonecoin = int(money)-int(deposit)
Основной код, который проверяет, правильно ли вы получили Tails
elif flipresults == "Tails":
print("You flip the coin")
time.sleep(2)
print("It's tails")
if HORT.upper() == "T" or "t":
wincoin = int(deposit)*2
print("You won",wincoin)
howmuchwin = wincoin+money
print("Total:",int(howmuchwin))
else:
print("You lost that one. You now have",resultmonecoin)
game()
else:
print("This input wasn't understood!")
flip()
Примечание: переменная money - это что-то вроде 500
или 200
Проблема:
[H] EADS или [T] AILS T
Вы подбрасываете монету
Это хвосты
Вы выиграли 468
Traceback (most recent call last):
File "C:\Users\yeet\Desktop\Casino.py", line 40, in flip
howmuchwin = wincoin+money
TypeError: unsupported operand type(s) for +: 'int' and 'str