Toy Shop Задача
Здравейте на всички! Когато предадох задачата си , ми изсписва, че не минава два от тестовете 5 и 10.Всъщото време не пише защо не ги минава. Някой ако може да ми каже къде греша ще е страхотно.
Кода:
tripCost = float(input())
puzzels = int(input())
talkingDolls = int(input())
teddyBear = int(input())
minions = int(input())
trucks = int(input())
total_amountM = (puzzels*2.60) + (talkingDolls*3) + (teddyBear*4.10) + (minions*8.20) + (trucks*2)
total_amount = puzzels+teddyBear+talkingDolls+minions+trucks
if total_amount > 50:
total_amountM = total_amountM - ((total_amountM/100)*25)
total_amountM = total_amountM - ((total_amountM/100)*10)
if total_amountM > tripCost:
print(f'Yes! {(total_amountM - tripCost):.2f} lv left.')
else:
print(f'Not enough money! {(abs(tripCost - total_amountM)):.2f} lv needed.')
Благодаря много за отделеното време!