- 2
How to run the multiple test cases in one program please explain me
11 Answers
+ 2
Just write a generic code which will satisfy all test cases.
+ 1
kottala vikram
If you know then what is the problem.
Just write and run, all test cases will be pass.
+ 1
kottala vikram
Where did you take input?
You are writing Hard Code value so how all test cases will be pass?
0
No bro I am asking in any coding exam how to run multiple test cases
0
How bro I don't know please help me
Take string reverse example
Take the multiple inputs and show to me bro please
0
kottala vikram
Do you know how to reverse a string?
0
Yes bro I know
0
In single program only are each different input to write different program
0
kottala vikram
Doesn't matter on different input. If you write generic code then doesn't matter what inputs are.
For example:
sum = int(input()) + int(input())
print (sum)
This is a general logic to add 2 numbers. Output will depend on inputs.
1 + 2 = 3
2 + 3 = 5
No need to write different program.
0
Please explain me this example