0

# 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.

6 Answers

+ 3

You need to use integer division and the output should be one without any extra text: print(pie)

+ 2

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)

+ 2

Tell me, how can we find out what it is about?

+ 1

print(fruit // 2 // 3)

+ 1

Thank you everyone. I have solved it
https://code.sololearn.com/c5GYnA2cNWOc/?ref=app

0

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