Halloween candy code easy level. Can someone help what is wrong with this | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
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 ответов
+ 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