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!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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