24 k magic problem (module 4 python for beginners)
Now that we know how to combine multiple conditions, letās improve our gold purity checker program and output the corresponding purity level in Karats! Here is the purity chart weāll be using: 24K ā 99.9% 22K ā 91.7% 20K ā 83.3% 18K ā 75.0% If the percentage is between 75 and 83.3, the gold is considered to be 18K. If it's between 83.3 and 91.7 - then itās 20K, and so on. Given the percentage as input, output the corresponding Karat value, including the letter K. Sample Input: 92.4 Sample Output: 22K Here the code I have done purity = float(input()) if purity >= 99.99 and purity <= 100: print("24K") elif purity >= 91.7: print("22K") elif purity >= 83.3: print("20K") elif purity >= 75.0: print("18K") This code pass all test case except the last test case (test case 7) Please help me ...finding which part I done wrong