0
Figure out any bug
2 Respuestas
+ 7
Durga Prasad Naik ,
the issue in the code is the round() function. the task description says: ("halloween candy" from code coach on the community section)
Output Format
A percentage value rounded up to the nearest whole number.
rounding UP means that we have to use the ceil() function instead of round. to use ceil() we need to import the math module.
+ 3
I dont see any bug, code works fine if you enter number.
But if you dont enter number, you will get error, you just need to cover this case somehow, for example to keep asking user to enter number if number is empty or are not number, or to just show text with error if user input is wrong.
And it works with intiger, so if user enter float like 0.2 we get error