0

How to write this code, please tell me, I need to solve such examples 🙏🏻🙏🏻🙏🏻(python)

You have a bowl on your counter with an even number of pieces of fruit in it. Half of them are bananas, and the other half are apples. You need 3 apples to make a pie. Task Your task is to evaluate the total number of pies that you can make with the apples that are in your bowl given to total amount of fruit in the bowl. Input Format An integer that represents the total amount of fruit in the bowl. Output Format An integer representing the total number of whole apple pies that you can make. Sample Input 26 Sample Output 4

21st Jun 2023, 7:54 PM
Amirhossein
Amirhossein - avatar
3 Respostas
+ 5
Try to reproduce the calculation for the given example: 26 fruit pieces, that means 13 apples. How many pies can you make with 13 apples? (Hint: use floor division).
21st Jun 2023, 8:13 PM
Lisa
Lisa - avatar
+ 3
Koli Refrain from giving ready-made code. Besides, the OP is asking about Python as you can see from the tag.
22nd Jun 2023, 5:19 AM
Lisa
Lisa - avatar