0

Halloween candy code easy level. Can someone help what is wrong with this

houses = int(input()) print (round((2/houses )*100))

10th Apr 2021, 10:54 AM
Ű§ŰłÙ„Ű§Ù… Ű§Ù„ŰšŰșŰŻŰ§ŰŻÙ‰
Ű§ŰłÙ„Ű§Ù… Ű§Ù„ŰšŰșŰŻŰ§ŰŻÙ‰ - avatar
2 Answers
+ 7
Output should be rounded up to the nearest integer. So you need to use math.ceil() instead of round () import math houses = int(input()) print (math.ceil((2/houses )*100))
10th Apr 2021, 10:59 AM
Simba
Simba - avatar
+ 1
Thanks
10th Apr 2021, 11:02 AM
Ű§ŰłÙ„Ű§Ù… Ű§Ù„ŰšŰșŰŻŰ§ŰŻÙ‰
Ű§ŰłÙ„Ű§Ù… Ű§Ù„ŰšŰșŰŻŰ§ŰŻÙ‰ - avatar