Ask coding questions

← Back to all posts
Formatting Problems
ConnorTruelove (0)


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 (6006) [earned 5 cycles]
View Answer

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

Coder100 (16804)

input is very very very buggy on replit.

Please, use this function instead:

def _input(text='')
  print(text, end='')
  return input()

Add it to the TOP of the file.

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

sylashur (54)

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 (435)

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 (0)

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