Skip to content
← Back to Community
The output thing on the right side is all jumbled up
Profile icon
TGSG

Hi,

I am trying to get a game to work (absolute beginner here just following a youtube tutorial), when I put the code in pycharm it works perfectly but when I try and run it through repl (or any other online... terminal (I think they are called)) the output is all messed up...

I have got a feeling that it has got something to do with the line length being too long (a warning popped up on pycharm that said lines over 120 characters long, this is the only reason I say too long), but as I said... I am 100% beginner (up until this morning I thought you could code in Notebook and thought python was a snake).

Excuse the content, just having a bit of fun with a mate.

I assume you can also see the project through my profile (being public), if this is wrong then please let me know how to upload it.

Appreciate any assistance

Voters
Profile icon
TGSG
Comments
hotnewtop
Profile icon
SaharshY

damn

Profile icon
RYANTADIPARTHI

solution

add \n to your lines of code to break it up. then it won't show those kinds of stuff.

if ans == "shed": print("Of course you gotta go to the shed first, where else you gonna\n get your energy from. ") print("You have a quick bill and head\n out to start weeding your \nfucking lawn!")

like that.
That should work

Profile icon
TGSG

@RYANTADIPARTHI so am I right in that the lines are too long? and I assume that \n is a new line?

Thanks for your quick reply

Profile icon
RYANTADIPARTHI

@TGSG
yes. the lines are too long. \n is a new line. click check mark if i helped.

Profile icon
RYANTADIPARTHI

Uh, what is the error you are having?

EDIT: nvm

Profile icon
TGSG

oh btw the answers to get to where the error is is
Steve
25
yes
no
shed
Then it starts going all funky, jumbling up everything and such