Kaleidoscopes
Where is my mistake? The solution I'm getting, when I get a input of 3 is wrong by 0.1 evertime: You sell souvenir kaleidoscopes at a gift shop, and if a customer buys more than one, they get a 10% discount on all of them! Given the total number of kaleidoscopes that a customer buys, let them know what their total will be. Tax is 7%. All of your kaleidoscopes cost the same amount, 5.00. Task: Take the number of kaleidoscopes that a customer buys and output their total cost including tax and any discounts. Input Format: An integer value that represents the number of kaleidoscopes that a customer orders. Output Format: A number that represents the total purchase price to two decimal places. Sample Input: 4 Sample Output: 19.26 my solution: num = int(input()) disc = 0.1 tax = 0.07 cost = 5 total = 0 if num > 1: total = num*cost+(num*cost*tax)-(disc*num*cost) else: total = num*cost+(num*cost*tax) print(round(total,2))