+ 1
Hi I have a question, does anyone know why when you try to do the practice exercise they don't let you use the input?
Example X= input()) Print(x) When you run the program it doesn't let you put the information for the input.when I do It on the code play ground it let me put the information.If any one knows why this happens please let me know.
14 Réponses
+ 2
In code coach the system will itself give input to your input statement and calculate the results and then match with pre existing saved answer
+ 2
anthony silver you are allowed to take input while solving the code coach problems. It's just that it would be sololearn which will be giving input to your program instead of you.
How the sololearn will give input to your program is given along with question statement only, and your program has to work will all the possible used cases and provide strictly correct output in order to pass.
+ 1
Indeed.
It's like someone else is testing the code on number of different inputs (test cases)
And is matching the output with the ones stored with them to check if your program is giving correct answers or not.
And as the process is automated and it is just a computer which is evaluating your output, thus your output should be strictly the same as described in questions statement, even an extra character or a typo can yield wrong answer verdict.
+ 1
Ok thanks , that helps a lot actually, Jesús Crist bless you
0
Test tasks are checked according to a strict template, and this does not involve arbitrary input data. That's why your input doesn't work there.
0
Ok thanks , but some of the test tasks I need to use the input, it's something necessary , and I try to do it in other ways but it doesn't work either
0
Ok that makes sense, because I saw results without I put something, but I try some time's to work with those results but for some reason that I don't know It doesn't work too
0
We need a specific code example that doesn't work. The question is not clear.
0
Password=int(input())
x=34
if password==x:
print ("Welcome")
else:
print ("sorry, wrong password, try again")
This is an example , lest supposed that In a test task said that they need to make password program and they need that I use the input for put a password and the password has to be with the number 34 . I need to use the input otherwise it would not work, I try to do it and then it tell s me that is wrong, but the code that I use as the example it perfectly works in the code play ground, I tray to do it without the input and just with a variable but again works in the code play ground but not in the test test task
0
If you do not do what the test task asks, then your code will not work there.
0
Yes obviously, but what I'm try to explain is that that's exactly the problem because in other test tasks that doesn't involve the input , those works, but with the ones that involves the input, with those are the ones that I have the problems
0
Ok so you are telling me that sololearn is the one that when I'm doing the task s puts the information for me?
0
Ok so I have to do in the right way the task , no focuse in the input but in the task it self right?
0
Yes