0

Kaleidoscope else: says invalid syntax

else statement says invalid syntax custpurchasedscopes = int(input()) total_purchase = custpurchasedscopes * 5 discount_purchase = total_purchase = total_purchase - (total_purchase * .10) + (total_purchase * .07) nodiscount = total_purchase + (total_purchase * .07) if custpurchasedscopes > 1: print(round(discount_purchase ,2) else: print(round(nodiscount ,2)

12th Jul 2021, 7:42 PM
Lee 4 Code
Lee 4 Code - avatar
2 Antworten
+ 2
In your print statements the closing ")" are missing
12th Jul 2021, 7:56 PM
Lisa
Lisa - avatar
+ 1
Thanks Lisa! Final outcome kalscp = 5.00 tax = .07 disc = .10 purchase = int(input()) cost = purchase * kalscp total_cost = (cost * tax) + cost discountcost = cost - (cost * disc) total_discountcost = discountcost + (discountcost * tax) if purchase > 1: print(round(total_discountcost, 2)) else: print(round(total_cost, 2))
12th Jul 2021, 8:05 PM
Lee 4 Code
Lee 4 Code - avatar