+ 6
My first code coach please tell me how to solve different situation in one question in code coach. I tried many time....
Please help
22 Respuestas
+ 5
💕Sophia's World💞
#python answer in one line
print(int(input())//6)
#answer in 2 lines
fruits = int(input())
print(fruits//6)
#answer in 3 lines
fruits = int(input())
pies = fruits//6
print(pies)
#answer in 4 lines
fruits = int(input())
apples = fruits//2
pies = apples//3
print(pies)
+ 7
Don't try to jump directly to code playground after reading the question.Think of how to solve the problem in numerous way and start solving it.I think you will get better result.Hope it help.
+ 5
This is the question i am trying to do with python but if i complete situation 1 so how can i complete situation 2 in results and other situations
+ 5
I am gonna use python
+ 3
Yes that i know but how to win all the situations
+ 3
Did you please give me the answer in link of that question so that i ll understand how to solve problems of code coach and how to use than i think my all doutb will be clear.....
Please....
+ 1
💕Sophia's World💞
Which language are you going use.
+ 1
fruit = int(input())
#your code goes here
apples = fruit / 2
number_of_pies = apples / 3
number_of_pies = int(number_of_pies)
print(number_of_pies)
This is what I did to pass all conditions
+ 1
you could use the condition if, the apples >= 3 divide the apples by 3, but if the condition is false, the number of pies is 0
0
💕Sophia's World💞
1st show your attempt than we can tell what is wrong with your code.
0
💕Sophia's World💞 1st post your code here
0
First, divide the total number of fruit to get the total number of apple.Then floor division it by 3 as it require 3 apple to make one pie.Good luck
0
Something like this
fruit = int(input())
apple = (fruit//2)
pie = (apple//3)
print(pie)
Hope you get the concept.
0
💕Sophia's World💞
Hard work will never disappoint you :)
As I see that is your motto
0
1st learn coding by yourself then try to input the code..
- 2
internal/main/run_main_module.js:17:47
- 2
İ dont know / this reverse
- 2
Hi