Quién me ayuda con El ejercicio de calcular pureza a kilates? Este es el código que tengo pero no funciona | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Quién me ayuda con El ejercicio de calcular pureza a kilates? Este es el código que tengo pero no funciona

purity = float(input()) if purity > 75 and purity <83.3: print("18k") if purity > 83.3 and purity <91.7: print("20k") if purity > 91.7 and purity <99.9: print("22k") if purity >99.9: print("24k")

3rd May 2022, 10:07 PM
Isaac Yepez
Isaac Yepez - avatar
1 Answer
+ 3
👉 Please tag the relevant programming language and mention the course name and the task name 👉 Do not tag "polymorphism", it is not related to your question. 👉 Read the task description carefully: It is purity >= 75 and and purity >= 83.3 and so on. Consider input is exactly 83.3 – it will not be caught by the current code
4th May 2022, 11:28 AM
Lisa
Lisa - avatar