Въпрос относно Conditional Statements - Lab - 08-Toy Shop
Здравейте, Реших задачата за Toy Shop, като в PyCharm всичко е точно, но като я пусна в judge ми дава само 60/100. Гледах, гледах, не успях да намеря пробрем. Пускам тук моето решение, за да може някой ако види проблемът, да ме светне :)
trip_cost = float(input())
puzzle_count = int(input())
talking_doll = int(input())
teddy_bear = int(input())
minnions = int(input())
trucks = int(input())
total_count = puzzle_count + talking_doll + teddy_bear + minnions + trucks
combined_purchase = (puzzle_count*2.60) + (talking_doll*3) + (teddy_bear*4.10) + (minnions*8.20) + (trucks*2)
discount = (combined_purchase*25)/100
if total_count < 50:
rent2 = ((combined_purchase*10)/100)
total2 = combined_purchase - rent2
if total2 < trip_cost:
money_left2 =(trip_cost - total2)
final2 = round(money_left2, 2)
print('Not enough money! {0} lv needed.'.format(final2))
elif total2 >= trip_cost:
money_left3 = (total2 - trip_cost)
final3 = round(money_left3, 2)
print('Yes! {0} lv left.'.format(final3))
elif total_count >= 50:
discounted_price = combined_purchase - discount
rent = (discounted_price*10)/100
total = discounted_price - rent
if total >= trip_cost:
money_left = (total - trip_cost)
final = round(money_left, 2)
print('Yes! {0} lv left.'.format(final))
elif total < trip_cost:
money_left4 = (trip_cost - total)
final4 = round(money_left4, 2)
print('Not enough money! {0} lv needed.'.format(final4))