What does the print() function do in Python?
It shows a message or output on the screen.
What are two things a function can do?
Make something happen. 2) Return a value.
What are the three types of functions in Python?
1) Built-in functions
2) Functions from modules
3) Functions you create yourself
True or False — A Python function can take any number of arguments, including none.
True
Besides the name, what else is important in a function?
The arguments — they’re the inputs the function uses.
What should you think about when naming a function?
The name should describe what the function does.
What do Python functions always need?
Parentheses () — even if there are no arguments.
How do you run a function with arguments?
Put the arguments inside the parentheses.
True or False — You must use parentheses even if there are no arguments.
True
What is a string?
A string is delimited with quotes.
True or False: Anything you put in quotes will be taken literally, not as code but as data
True
What are the steps of how a function is executed?
What does the print() function do?
Whatever you put in print() shows up in the console.
What kind of arguments can you put in print()?
Anything
What does print() return?
Nothing (None). It just shows stuff—no value is given back.
What’s unique about Python’s syntax?
Normally, only one instruction per line is allowed.
You can split a long instruction across lines, but not stack multiple ones in a line without a semicolon.
How can you make a new line in Python?
What’s a backslash in a string called?
An escape character – it gives special meaning to the next letter.
What does \n mean?
It means newline – it moves the output to the next line.