def USD_EUR():
User = input(‘Enter your ID: ‘) # Запрос ID
bl.execute(f”””SELECT UserID FROM users_balance WHERE UserID = ? ;”””, (User,))
if not bl.fetchone():
print(‘There is no user with this ID’)
try:
EUR = float(input(‘How many euro do you want to receive?: ‘))
except ValueError:
print(“Пиши цифры и не пусто”)
EUR_1 = float(EUR) * float(1.15)
print(f”It will cost you: {EUR_1} USD”)
bl.execute(f”””SELECT * FROM users_balance;”””)
user_money = bl.fetchone()
result_1 = EUR + float(user_money[3])
result = float(user_money[2]) – EUR_1
if result < 0:
print('There are not enough funds on the USD balance')
Исправь ошибку