Code coach | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code coach

Please what is wrong with this code? Someone that has done this challenge help me please. houses = int(input()) #your code goes here frac = 2/houses percent = frac * 100 perIsDollar = round(percent) print(perIsDollar)

2nd Mar 2020, 1:51 PM
Ifeanyi Kalu
Ifeanyi Kalu - avatar
1 Answer
+ 1
The question asks to "round up" the result, so you shouldn't use round() but use ceil() from math module instead.
2nd Mar 2020, 2:15 PM
你知道規則,我也是
你知道規則,我也是 - avatar