Consecutive print statements will appear on consecutive lines.
print ('first line')
print ('second line')
Output
first line
second line
You’ll learn how to print multiple lines in a single print statement a little later on in the Python course. Try not to race ahead, in the meantime. Drill on the basics you are already learning.
“Running a program means telling a computer to read the text file, translate it to the set of operations that it understands, and perform those actions.” Can anyone expand on translating a text file to the set of operations that a computer understands? I’m not sure if I’m looking into the statement too much (which is very possible) or if there is more to be elucidated here. Thanks in advance.
Python is interpreted and compiled in stages. We go from text to byte code to assembler to machine language. A script is largely interpreted/compiled as it is run, though some of the process is cached so only has to be done once during a session. Let’s first address the question, ‘is python interpreted or compiled?’
In a general sense it is the definition of a data type or replicable object. It is something that comes up in the courses for many languages. For now best to put this question to the side.
Be sure to start with, and complete the Learn %language% module before attempting anything else in the syllabus.
Welcome to the forums! We can’t have spaces in the names of our variables, and according to the Python style guide, we should use snake_case to name variables. This method of naming variables dictates that we should separate words using underscores.