How do I start a new line?
I am not very good at Python
I'm trying to write code for a computer science class. I know that the first thing that happens is that the program has to be entered into the computer, and then it has to be run, but when I type my code into a text file and save it as .py, nothing seems to happen when I open it up in IDLE. How do I tell python where to go when my program is run? I am told to explore https://knowtechie.com/top-6-most-popular-tech-tools-in-the-uk/ to learn about different tech tools to get the required help. What do you guys think?
Use \n in a string to make a new line, or use triple quotations '''Place string here.''' to have multiple lines. If you are using text-based gaming like RPG, then I recommend the \n, but if you want to include ASCII art (making pictures out to many letters, symbols, numbers, and others) then use the triple quotes.
There are multiple ways to do it:
you can add a
'thingy to write on different lines.
print('''This will be printed on multiple lines''')
Or you can just use the print statement:
print("hello") print("New line") print() print("skipped a line")