[SOLVED] Can anyone help me with the fruit bowl task? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
- 1

[SOLVED] Can anyone help me with the fruit bowl task?

here is my code, i have no idea what's wrong about it. fruit = int(input()) x = fruit / 2 if fruit < 3: y = 0 print(y)

25th Jul 2022, 10:19 PM
Unexpected Explosions
Unexpected Explosions - avatar
4 ответов
0
# Hi, Unexpected Explosions ! # You can compare your solution to this one: a = int(input()) / 2 print(int(a / 3) if a >= 3 else 0)
25th Jul 2022, 11:32 PM
Per Bratthammar
Per Bratthammar - avatar
+ 1
Per Bratthammar, thank you, i will make sure to try it out
26th Jul 2022, 12:21 AM
Unexpected Explosions
Unexpected Explosions - avatar
0
Describe the task. Why do you define the variable "x" and don't use it anywhere?
25th Jul 2022, 11:35 PM
Solo
Solo - avatar
- 1
Solo, because if i simply write "fruit / 2" it doesn't work
26th Jul 2022, 12:21 AM
Unexpected Explosions
Unexpected Explosions - avatar