+ 1
Halween Candy challenge in Python
Hi guys, I have created the line correctly using round() function, and in the results both tests are correct ... however it asks me to try again... anyone can help me?
5 Answers
+ 3
Soad Afify ,
before we all have to guess, please post your attempt here. without having seen your complete code it is difficult to find out what the issue is.
thanks!
+ 2
Hello man, You can use the ceil function from the math module because the roud function approximates the nearest decimal number. Or you can add 0.5 and after using rounding function.
0
I already tried ceil function but didn't work, now I tried the second option and worked find ... but I didn't understand why? can you plz explain? ... and Thanks for your support âșïž
0
Soad Afify i'm agree
- 1
hey guys, this is my code after adding 0.5
dollar = 2
result = ((dollar *100)/houses)+0.5
print(round(result))