0

Halloween Candy bug

houses=int(input()) def near(n) : if n-int(n) > 0.5 : return int(n+1) return int(n) print(near(2/houses * 100)) This is my solution to the Halloween Candy problem but it doesnt work : the first and the secoond attempts are verified but the 3rd,4th and 5th are not. Thanks for the help.

19th Feb 2020, 1:50 PM
Othmane DAHI
Othmane DAHI - avatar
3 Réponses
+ 1
Thank you ! Helpful
20th Feb 2020, 12:11 PM
Othmane DAHI
Othmane DAHI - avatar
+ 1
Othmane DAHI You're welcome.
20th Feb 2020, 12:13 PM
Mihai Apostol
Mihai Apostol - avatar