+ 1

Task "Halloween candy"

houses = int(input()) #your code goes here house_cash = 2 result = house_cash / houses print (round(result * 100)) Do i have something wrong? Please check my code)

29th Jan 2024, 4:21 PM
Пігіда Данило
Пігіда Данило - avatar
2 odpowiedzi
+ 9
Use math library ceil function rather then rounding. In the below thread it is explained well. https://www.sololearn.com/Discuss/3256055/?ref=app
29th Jan 2024, 4:32 PM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 2
In this task it is written to round the result to the nearest integer, but in fact it is always necessary to round up. You can do this with round(), with a little addition, think about what you need to do so that round() always rounds up...😎
29th Jan 2024, 11:02 PM
Solo
Solo - avatar