How do I solve end-of-module projects? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do I solve end-of-module projects?

Because I solve one but the other test has another value and it goes wrong, how do I solve it?

30th Mar 2021, 5:37 PM
Andres Gómez
Andres Gómez - avatar
2 Answers
+ 3
Don't put the numbers from test cases in your code. Use input like you would take input from user and the testing routine will give the values for each test case via that. Example in python: x = 123 Change to: x = int(input())
30th Mar 2021, 7:08 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
+ 1
Andres Gómez Try to understand all the conditions and use logic.
1st Apr 2021, 2:19 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar