+ 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)
2 Réponses
+ 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))
+ 1
Ok nice, I tried it and it's work!