Ask coding questions

← Back to all posts
Failing a test because of an extra line
LawrenceKaiser

So I have this little program written up as part of a school assignment, this means that its using the testing feature on repl.it. And I'm noticing that while my program gets the right answer on the test, I sill fail the test. I think its because of the extra line that gets put out on my program's end.

Can anybody help me with this? I just wanna get rid of the line so I don't fail the tests.

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
LawrenceKaiser
Comments
hotnewtop
Coder100

Print adds a \n by default. You don't want that, it seems

will do it!

LawrenceKaiser

@Coder100 This got rid of the line thank you! Though I'm still failing the tests for some reason even though the results are exactly the same now. I guess I'll just inform my teacher about it so they know when I submit it. Thank you!

Coder100

np!

Mark as correct answer please! @LawrenceKaiser

Coder100

@LawrenceKaiser

one thing you should check is that there is no extra whitespace after the :