24K Magic - Boolean logic- only challenge 7 not working what should i do to improve my code ? | Sololearn: Learn to code for FREE!

+1

24K Magic - Boolean logic- only challenge 7 not working what should i do to improve my code ?

purity = float(input()) if purity >= 75.0 and purity < 83.3 : print("18K") elif purity >= 83.3 and purity < 91.7 : print("20K") elif purity >= 91.7 and purity < 99.9 : print("22K") elif purity == 99.99: print("24K")

4/12/2021 10:50:03 PM

ahmed dhamen

3 Answers

New Answer

+3

fix this line: elif purity == 99.99:

+1

else purity ==99.99:

0

1 decimal point so should be 99.9