Skip to content
Failing a test because of an extra line
Profile icon
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.

image

You are viewing a single comment. View All
Profile icon
Coder100

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

print('\nEach person should pay $'+ str(final_split), end = '')

will do it!

Profile icon
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!

Profile icon
Coder100

np!

Mark as correct answer please! @LawrenceKaiser

Profile icon
Coder100

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