0
How should I do this test cases
In the frequency analyzer project, there are two test cases, I have coded the answer to both, but I don't know how to run them individually.
6 Antworten
+ 3
You need to write a code that will work for any input, not just that 2 test cases. You can use input() method to take the input from the compiler , then manipulate what you get into what you need to output.
Btw, it would be good if you show your code.
+ 2
TEKO SAMUEL OGALA You don't hard-code your solutions so that they only work for certain test cases. The aim is to code it so that it will work for ANY test case.
A test case involves giving your code some input, and checks whether the output of your code is correct. Your code needs to take the input using input(), and return the output using print().
+ 1
If you want to run a code on Sololearn then,
➡️ Go to the Code Playground section (you can find it here : https://code.sololearn.com) and click on the + icon at the bottom right corner.
➡️ Then select python and write your code and save it.
➡️ Then click on Run and your Code will get executed.
0
I don't know how to share code.
0
But the first test case is actually correct.
0
Even the second , when I run my code