Please can someone help me with this
https://code.sololearn.com/c5GYnA2cNWOc/?ref=app It is meant to give the number of pie that be obtained from a given input. I coded it and it's working but it didn't pass any of the test cases.
You need to use integer division and the output should be one without any extra text: print(pie)
I think you have to use floor division fruit = int(input()) apple = (fruit // 2) #here #print("number of apples:", str(apple)) pie = (apple // 3) print(pie)
Tell me, how can we find out what it is about?
print(fruit // 2 // 3)
Thank you everyone. I have solved it https://code.sololearn.com/c5GYnA2cNWOc/?ref=app
This is the question. You have a bowl on your counter with an even number of pieces of fruit in it. Half of them are bananas while the other half are apples. You need 3 apples to make a pie. The task is to evaluate the amount of pie you can make with the apples in the bowl given the total amount of fruit in the bowl