Ask coding questions

← Back to all posts
help with python
zhaq6129 (49)

kk so um im making a console game, and im tryna figure out how to skip a line and also how to make some stuff

bigger font

and also how to add inputs and values and stuff

Answered by SixBeeps (4767) [earned 5 cycles]
View Answer
Comments
hotnewtop
SixBeeps (4767)

1.) If you want to skip a line, just add a blank print statement or print out a newline (/n) character
2.) Font size isn't an option, unless you want to do ASCII art
3.) User input is literally input(), and it returns a string that you can store in a variable.

zhaq6129 (49)

so um regarding font size is there a way I could change that or must I do acscii art and also hoe does input work inside the delprint thing

SixBeeps (4767)

@zhaq6129 You cannot change font size at all, which is intentional as to keep backwards compatibility with older terminals.

Also, you don't want to delprint an input, that's not physically possible.

zhaq6129 (49)

@SixBeeps oh because the slow print thing i found says to write delprint

SixBeeps (4767)

@zhaq6129 well yeah delprint is slowprint, but you asked for input + slowprint

zhaq6129 (49)

@SixBeeps yeh so how do you do that

SixBeeps (4767)

@zhaq6129 How 'bout this: link me the thing that's telling you to slowprint an input and we can work from there

zhaq6129 (49)

@SixBeeps nvm, but um how do i make the rest of everything slowprint

zhaq6129 (49)

WAIT WAIT WAIT WAIT so um i get this error:

SixBeeps (4767)

@zhaq6129 oh i see what you mean now. you can slowprint the question with no ending character, then call input with no parameters. something like this:

slowprint("what is name?", end='')
name = input()
SixBeeps (4767)

@zhaq6129 don't rename slowprint to print, that's gonna cause problems.

SixBeeps (4767)

@zhaq6129 Instead of calling with multiple arguments, just concatenate the two strings together

zhaq6129 (49)

@SixBeeps english please, i just started python a couple minutes ago (sorry if i sound rude)

SixBeeps (4767)

@zhaq6129 print() is special in that it allows you to pass in multiple arguments, e.x. print("thing1", "thing2")
This doesn't work for much of anything else, though. To fix this, you should do what's called concatenation, or joining two strings together. So, you need sprint("thing1" + "thing2") instead of sprint("thing1", "thing2")

zhaq6129 (49)

ok so fixed but it wont let me type in my name it will just automatically say none

zhaq6129 (49)

also how do I make an if then else statement

SixBeeps (4767)

@zhaq6129 then is actually not a keyword in Python, so it's just if/else. You can read about conditionals here: https://www.w3schools.com/python/python_conditions.asp

RYANTADIPARTHI (5835)

Solution

use \n or print(). Like this.

print('something')
print()
print('something else')

or

print('something\n')
print('something else')

like that.
That should work

LoveFromSkyy (105)

@SixBeeps is right. Use \n to skip a line. EX: print("hello\n you skipped a line") If you want user input you would do something like this: name = input("Enter your name:") The output of this would be Enter your name: (you should up a space after : ). If you want to print this user input you would do something like, print("Hello " name) You may need to put a comma but you will find that out. Have a nice day!