+ 1
code coach
new to programming having an issue w the "code coach" opens several examples at the same time so your code will only be right for one or the other
2 Respuestas
+ 2
Don't hardcode for one value, the point is to take the input described by the task and to develop an algorithm that works for every possible input.
For example, if the task was to sum two numbers, you have to take two numbers as input:
n1 = int( input() )
n2 = int( input() )
And then output the sum:
print( n1 + n2 )
And not hardcode for one test case, which might be (3, 5):
n1 = 3
n2 = 5
print( n1 + n2 )
That would only work for that one specific test case and not constitute a general solution to the problem.
+ 1
thank you!