Do you want to chat with a robot?

If you do then my game is the perfect game for you!

play my game here https://replit.com/@Evanisha/Chat-With-A-Robot?v=1

2 Likes

Nice! Suggestions:

  • Don’t overuse scrollTxt(). It becomes annoying.
  • You don’t need to create so many new lines. Just use os.system("clear") or replit.clear()
  • If you really want to create many new lines, dont just keep doing print(""), even print() is good enough without any parameters. but you should use a while loop:
i = 0
while i < 30: # If I want 30 new lines
  print()
  • But then, it’s still no use.

That’s using bash which I consider bad practice

either that or print('\033c', end='')

newlines = 30
print('\n' * newlines, end='')

OR

def write_lines(lines: int) -> None:
  print('\n' * lines, end='')

write_lines(30)
1 Like

Everyone considers that bad practice. However, I use this mostly because I’ve had bad experience with using replit.clear(). One time, I tried using it, and replit.clear() only cleared half the screen (for some reason). I haven’t used it since then. Could be because there was too much on the screen at that time.