I have no idea how to solve any problem in code coaching, please help me or give me example | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I have no idea how to solve any problem in code coaching, please help me or give me example

9th Feb 2020, 5:52 PM
YEYBABY
YEYBABY - avatar
28 Answers
+ 5
It deends on the language, but here are examples (with some steps omitted) in Java and Python for the Popsicles challenge: Java: import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int siblings = input.nextInt(); int popsicles = input.nextInt(); if([CONDITION OMITTED]){ System.out.println("give away"); } [OTHER CASE OMITTED] } } Python: siblings = int(input()) popsicles = int(input()) if [CONDITION OMITTED]: print("give away") [OTHER CASE OMITTED]
10th Feb 2020, 4:37 PM
Travis
Travis - avatar
+ 3
Try to brain storm every thing then if you are still stuck... google it XD. No but seriously google it
9th Feb 2020, 5:55 PM
Cristian Herendi
Cristian Herendi - avatar
+ 2
Hey dont take it from me, i dont even know what code coaching is!
9th Feb 2020, 6:08 PM
Cristian Herendi
Cristian Herendi - avatar
+ 2
YEYBABY But you ask for an example ;)
9th Feb 2020, 6:37 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
YEYBABY I guess you just need more practice. Or do you have troubles with english?
9th Feb 2020, 6:38 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
YEYBABY I would use google translate. Here is an example: https://www.sololearn.com/coach/41?ref=app User input is an integer number. Now examine the input: input < 5 -> print "I got this!" input <= 5 && input >= 10 -> print "Help me Batman" input > 10 -> print "Good luck on it!" The expected output is a string, which you need to print.
9th Feb 2020, 6:48 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
So many answers but no one likes the question?
11th Feb 2020, 12:28 AM
Sonic
Sonic - avatar
+ 1
Thanks but didnt help at all
9th Feb 2020, 6:06 PM
YEYBABY
YEYBABY - avatar
+ 1
YEYBABY It is a bit unclear for me what you mean. Start with the easy task and write the code like you would did in the code playground. Please don't ask for codes here especially not for code coach because you get xp by solving them.
9th Feb 2020, 6:35 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
You can check my profile, I posted some code coach solvings in c lang, feel free to ask something about it. If you are lazy and want me to put it here, just say it.
11th Feb 2020, 4:38 AM
LastSecond959
LastSecond959 - avatar
+ 1
I just got a warning from a mod that you can't share the solution(s) of code coach challenge and YEYBABY , you can get help but not the full solution, otherwise, it will be reported as against the rules. As it stated here, https://code.sololearn.com/W466RGzeoZYe/?ref=app
13th Feb 2020, 12:47 PM
LastSecond959
LastSecond959 - avatar
0
No i mean i dont understand what is the format
9th Feb 2020, 6:00 PM
YEYBABY
YEYBABY - avatar
0
Just give me example of program
9th Feb 2020, 6:00 PM
YEYBABY
YEYBABY - avatar
0
Print("this??")
9th Feb 2020, 6:05 PM
Cristian Herendi
Cristian Herendi - avatar
0
Lol im not asking for the answer
9th Feb 2020, 6:36 PM
YEYBABY
YEYBABY - avatar
0
Idon't know how to answer the problem because i don't know how to format my answer i don't understand
9th Feb 2020, 6:37 PM
YEYBABY
YEYBABY - avatar
0
Yeah i ask for an example but i don't say with question just example of the answer's format
9th Feb 2020, 6:38 PM
YEYBABY
YEYBABY - avatar
0
Yeah ithink
9th Feb 2020, 6:38 PM
YEYBABY
YEYBABY - avatar
0
I don't much understand clearly
9th Feb 2020, 6:39 PM
YEYBABY
YEYBABY - avatar
0
hi - code coach gives you what the input types and output types are at a minimum. such as an input of integer for the Batman example problem. depending on the problem they may also give you the specific outputs. Your output for that particular problem should be a string that matches the 3 possible outputs they gave you in the problem explanation, ie “I got this” or whatever it was, I don’t recall the exact wording. The important part is that your output matches the test’s output exactly. case sensitivity matters. so for the batman example you’d have something in c++ like if (badguys < 5) cout >> “I got this!”; I hope that helps you get it figured out.
10th Feb 2020, 7:08 AM
Elizabeth Kelly
Elizabeth Kelly - avatar