+ 1
I tried the Haloween Candy. Where is my mistake? Rounding System.
Its in the Code Coach. Its stated that only the first 2 case fulfilled while the other 3 case failed. But i wont show to me what is the 3rd - 5th cases. I tried compraing w calculator and it works well. I cant think what value that failed the code. Is there any way i can see that, or is there any mistake ive done? I made all the var float (double also work). Else, only the 2nd case passes. https://code.sololearn.com/cMYsc7HD8VJh/?ref=app
6 Respostas
+ 2
Xtron135
import math
print(math.ceil((2/int(input()))*100))
Ceil method
+ 2
You forget to round Values so.
Read instruction properly and see input output format.
//ceil means "round up" to the nearest full value. So 200÷3 = 66.666 recurring.
//what ceil does is round it up to 67
Hope this will work
+ 2
Xtron135 see this
So 200÷3 = 66.666 recurring.
//what ceil does is round it up to 67 use ceil in result
0
ཞıɬıƙą ɱıʂɧཞą im not getting what r u saying. So u mean that the question required to "round up" no matter what. ok. now, how to use ceil? 😅