+ 2
Where am I need correct?
I get stuck in this challange I don't know how to fix: 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 https://code.sololearn.com/cGx64p4DGPjm/?ref=app
6 odpowiedzi
+ 2
1. 'fruits' is a string, and not a variable. To use variable emobe the quotation marks, fruits.
2. You don't need to have float values since the problem is asking for the whole number.
I used 'int' to convert the result to integer or whole number.
If you have more questions, please feel free to ask. Thanks.
https://code.sololearn.com/cJsbFqwDiQeH/?ref=app
+ 2
I can't understand
+ 1
fruit = int(input())
print(int(fruit/(2)//(3)))
+ 1
You don't have to convert it into float
+ 1
Thanks! I think I will have to review the lesson more carefully