+ 1

Halloween candy

I did the code from the Halloween candy challenge but only test 1 and test 2 I passed, but not the rest test, can you guys help me figure out my problem? Here's my code Houses = int(input()) Dollar_bill = (2/Houses)*100 print(round(Dollar_bill)

12th Jan 2021, 5:02 AM
WelfredK
WelfredK - avatar
2 Respuestas
+ 8
Output should be rounded to the nearest integer. Add this import math Houses = int(input()) Dollar_bill = (2/Houses)*100 print(math.ceil(Dollar_bill))
12th Jan 2021, 5:09 AM
Simba
Simba - avatar
+ 1
Ok nice, I tried it and it's work!
12th Jan 2021, 5:15 AM
WelfredK
WelfredK - avatar