0

Halloween candy . I'm not to sure if I'm missing something or not anything helps just so I can understand what I'm doing wrong

houses = 10 money = 2 result = money / houses result >= 10 print(round(result * 100))

18th Aug 2023, 5:18 AM
Cristofer Calderon
Cristofer Calderon - avatar
2 Answers
+ 2
Cristofer Calderon I see two issues. 1. The line, result >= 10, is merely a conditional expression and is not doing anything as a statement on its own. You may delete that line. 2. The round() function rounds to the nearest whole number. The requirement in the task is to round UP. The ceil() function is the one that rounds up. Edit: I just noticed a third issue. The program uses hard-coded values instead of taking input from the console. Be sure to read the task carefully to know what input it should read in.
18th Aug 2023, 6:26 AM
Brian
Brian - avatar
0
Thank you I really appreciate the explanation I wasn't aware of the ceil() yet since I haven't gotten to it while learning
8th Sep 2023, 4:00 AM
Cristofer Calderon
Cristofer Calderon - avatar