+ 1

What is wrong with this code?

houses = int(input()) if houses>=3: dolla = 2*100 ans = ((dolla)/houses) print(round(ans))

1st Jul 2022, 6:22 AM
Joseph Muthui
Joseph Muthui - avatar
4 Answers
+ 1
ceil() but I think you have to add 'from math import ceil'
1st Jul 2022, 1:10 PM
Aurélien Robert
Aurélien Robert - avatar
0
The Halloween Candy task instructs you to ensure the answer gets rounded up to the nearest dollar. You used the wrong rounding function. There is another one that always rounds up.
1st Jul 2022, 7:04 AM
Brian
Brian - avatar
0
Which one? Brian
1st Jul 2022, 7:39 AM
Joseph Muthui
Joseph Muthui - avatar
1st Jul 2022, 1:50 PM
Joseph Muthui
Joseph Muthui - avatar