0

Halloween Candy (Python)

Can someone tell me why Test Case 3, 4 & 5 are hidden?

4th May 2025, 9:54 PM
Technocrat
6 Respostas
+ 6
The instruction says: "A percentage value rounded ***up*** to the nearest whole number." For instance, 1.23 would ve rounded up to 2.
4th May 2025, 10:37 PM
Lisa
Lisa - avatar
+ 3
round is not always up...
4th May 2025, 11:35 PM
Bob_Li
Bob_Li - avatar
+ 2
test cases are hidden to prevent cheating You can just do: if input is 1 then output 2.45 else if input is 2 then output 4.77 else if input is 36 then output 512.16 else if input is 429 then output 47290.38 and pass all cases without actually solving the problem
4th May 2025, 10:48 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
+ 1
Technocrat import math print(math.ceil(4.2))
18th May 2025, 11:12 AM
Bob_Li
Bob_Li - avatar
0
And why does it keep telling me to try again? I can't see anything wrong with this code. houses = int(input()) #your code goes here print (round(2 / houses * 100))
4th May 2025, 10:25 PM
Technocrat
0
I'm flummoxed. There is no 'Roundup' function in Python. Any clues?
18th May 2025, 11:08 AM
Technocrat