Ask coding questions

← Back to all posts
Formatting Problems
ConnorTruelove

Hey,

This is my first day using python and I've been following along with a youtube video to try and learn. I've copied the code exactly but as you can see the formatting of the last line in the shell has gone really weird and displaying text out of order and missing out some of it.

Any help as to why this is?

Answered by RYANTADIPARTHI [earned 5 cycles]
View Answer
Voters
InariiSage
ConnorTruelove
Comments
hotnewtop
RYANTADIPARTHI

try using \n in your input. Put it in a few places. and you'll be good to go.

ConnorTruelove

@RYANTADIPARTHI This worked! Thank you so much :)

RYANTADIPARTHI

@ConnorTruelove no problem :)

Coder100

input is very very very buggy on replit.

Please, use this function instead:

Add it to the TOP of the file.

so when they do a input(), actually type in _input(). Thanks!

sylashur

The tutorial may have a place to copy the basic code from with no page formatting, if not, you'll have to manually fix the code.

robowolf

Well the indentations are from the pasted code. The code going on multiple lines is just due to the size of the window. You can change that by adjusting the line between the output window and input window.

ConnorTruelove

@robowolf I thought that initially too but I've made the window as wide as can be and still have the same issue