0

# Trick or Treat puzzle

The two examples it lets me see say they are correct however the 3 I can see say they fail https://code.sololearn.com/cSm5dQtHS884/?ref=app

5 Answers

0

Output Format
A percentage value rounded up to the nearest whole number.
convert chance to float not int, and round up is done with math.ceil() not round()

0

How do I get 2 decimals from math.ceil()?

0

you don't have to get 2 decimals.
the point of ceil() is to get a whole number.

0

Input:3
I get .6666666666
I need it to round up to the nearest .00 before multiplying by 100.
I'm confused how math.ceil() helps me?
I'm clearly missing something.

0

math.ceil() will help you round up and get rid of decimals.
example :
if the result is 6.2 ceil(6.2) equals 7
or ceil(6.8) equals 7
ceil(.66666) equals 1

Hot today