+ 1

When solving any code challenge there are certain test cases so do you write diff codes for each test case

i was able to do the test case 1 ,but when I tried the second case it always had a error, In test case 2 : There were 2 inputs So I wrote - " x= int(input()) y= int(input())" And there was an eoferror

30th Dec 2024, 5:51 PM
Bhumi
Bhumi - avatar
8 Answers
+ 5
No only single generic code which can satisfy all test cases.
30th Dec 2024, 6:02 PM
A͢J
A͢J - avatar
+ 3
Give a complete task description. Show your complete code.
30th Dec 2024, 6:04 PM
Lisa
Lisa - avatar
+ 2
Show your code. We cannot see what you typed in there.
30th Dec 2024, 6:40 PM
Lisa
Lisa - avatar
+ 2
A͢J and Lisa Thankyou both of you,I solved it
30th Dec 2024, 6:51 PM
Bhumi
Bhumi - avatar
+ 2
No, in code coaches, you only need to write 1, there are several test cases, but the reason for it is to make sure you code works in different situations And also, there's hidden test cases, that make sure people won't complete the tasks so easily
1st Jan 2025, 4:57 AM
☕︎︎AstroParrot✦
☕︎︎AstroParrot✦ - avatar
+ 1
siblings = int(input()) popsicles = int(input()) #siblings = 2 #popsicles = 5 #your code goes here,test case 1 x = popsicles/siblings if x==0: print("give away") else: print("eat them yourself") # test case 2
30th Dec 2024, 6:42 PM
Bhumi
Bhumi - avatar
1st Jan 2025, 2:11 PM
Bhumi
Bhumi - avatar