+ 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")
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