“Tip Calculator” and coach coding practice not working properly | Sololearn: Learn to code for FREE!

0

“Tip Calculator” and coach coding practice not working properly

I had a problem with tip calculator-I passed test case #1 but when it took me to TC #2, the code for TC#1 transferred to TC#2 and sent a “try again” msg. When I would redo the coding for TC #2, I would get a green check for TC #2 but then TC#1 had a red X and “try again” msg. The same goes on in the coach practice questions. Needless to say I’m not getting points for correctly coding. Am I doing something wrong?

10/18/2021 4:01:35 AM

Kathleen Martinez

3 Answers

New Answer

+1

The spirit of code assignments like code coach is being able to get the correct output based on the input. If you can do it, you solve the assignment. Let's say your program needs to calculate the square of an integer. If the input is 3, your code should print 9. If the input is 5, your code should print 25. This is all done in 1 program, 1 code. You need to implement a logic that satisfies any given value. It's not correct to write 3 * 3 in a code, 5 * 5 in another. You instead should write n * n, where n is given from the input.

+1

If you link your code, we can help you to figure out why the code isn't working

0

Thank you. I was over-thinking it. I got it.