#Mini Quiz solution price=int(input("price ")) age=int(input("age ")) tax=int(input("tax ")) if(age<=5): disc=100 elif(age<=18): disc=25 else: disc=0 pre_tax=price-price*disc/100 final=pre_tax+pre_tax*tax/100 #wrong: final=price-price*disc/100+price*tax/100 #to fix it: final=price-price*disc/100+(price-price*disc/100)*tax/100 print(final) #Test 1: price=100, age=3, tax=7, final=0 #Test 2: price=100, age=6, tax=7, (100-25*100/100)*1.07=80.25 #Test 3: price=100, age=19, tax=7, 100*1.07=107 #Test 4: price=100, age=5, tax=7 , 0 #Test 5: price=100, age=18, tax=7 (100-25*100/100)*1.07=80.25