Code Coach Program Issue | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Code Coach Program Issue

I'm having an issue in satisfying all the cases in the Halloween Candy Program in Code Coach. It is as follows: houses = int(input()) result = round((2/houses)*100) print(result) Anyone has any idea why it is not working in the last 3 cases, which are hidden? (Python Language Used)

20th Dec 2019, 11:09 AM
PrimeSoccer101
PrimeSoccer101 - avatar
2 ответов
+ 4
It is stated that the result should be rounded up to the nearest integer. However, the "round" function rounds either up or down, depending on what is closer.
20th Dec 2019, 11:30 AM
Shadow
Shadow - avatar
0
Worked like a charm! Thanks!
20th Dec 2019, 11:34 AM
PrimeSoccer101
PrimeSoccer101 - avatar