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

19th Feb 2020, 6:29 PM
Travis
5 Antworten
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()
19th Feb 2020, 6:36 PM
Bahhaⵣ
Bahhaⵣ - avatar
0
How do I get 2 decimals from math.ceil()?
19th Feb 2020, 6:48 PM
Travis
0
you don't have to get 2 decimals. the point of ceil() is to get a whole number.
19th Feb 2020, 6:51 PM
Bahhaⵣ
Bahhaⵣ - avatar
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.
19th Feb 2020, 7:04 PM
Travis
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
19th Feb 2020, 7:14 PM
Bahhaⵣ
Bahhaⵣ - avatar