+ 2
I have no idea how to solve any problem in code coaching, please help me or give me example
28 ответов
+ 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]
+ 3
Try to brain storm every thing then if you are still stuck... google it XD. No but seriously google it
+ 2
Hey dont take it from me, i dont even know what code coaching is!
+ 2
YEYBABY But you ask for an example ;)
+ 2
YEYBABY I guess you just need more practice.
Or do you have troubles with english?
+ 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.
+ 2
So many answers but no one likes the question?
+ 1
Thanks but didnt help at all
+ 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.
+ 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.
+ 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
0
No i mean i dont understand what is the format
0
Just give me example of program
0
Print("this??")
0
Lol im not asking for the answer
0
Idon't know how to answer the problem because i don't know how to format my answer i don't understand
0
Yeah i ask for an example but i don't say with question just example of the answer's format
0
Yeah ithink
0
I don't much understand clearly
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.