Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Simon Sauter There will be output. I have tested and then posted here. Just copy the code and see there.
8th Jun 2021, 1:01 AM
A͢J
A͢J - avatar
+ 3
Simon Sauter It will work in both cases, either you put = or without equal. Just problem is that in 99.99 there should be only 99.9
8th Jun 2021, 1:06 AM
A͢J
A͢J - avatar
+ 2
Juan Araujo There should be 99.9 instead of 99.99 Edited
8th Jun 2021, 12:44 AM
A͢J
A͢J - avatar
+ 1
AJ, if you remove equal signs like that you'll end up having no output when purity is either 83.3 or 91.7.
8th Jun 2021, 12:54 AM
Simon Sauter
Simon Sauter - avatar
0
What is the task the code is supposed to fulfill?
8th Jun 2021, 12:02 AM
Simon Sauter
Simon Sauter - avatar
0
There is no output if purity is less than 75.0. Maybe that's the issue, but it's impossible to say without the task description.
8th Jun 2021, 12:05 AM
Simon Sauter
Simon Sauter - avatar
0
Another possible issue is that you use "<=" for the second condition in the if statement and the first elif statement. That should probably be just "<" in both cases.
8th Jun 2021, 12:07 AM
Simon Sauter
Simon Sauter - avatar