My first code coach please tell me how to solve different situation in one question in code coach. I tried many time....
24 Answers
New Answer2/23/2021 3:55:09 AM
💕Sophia's World💞(소피아)24 Answers
New Answer💕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)
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.
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
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....
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
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
💕Sophia's World💞 1st show your attempt than we can tell what is wrong with your code.
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
Something like this fruit = int(input()) apple = (fruit//2) pie = (apple//3) print(pie) Hope you get the concept.
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message