Menu

Print Function

Card 1 of 15 0 got it 0 still learning
Question
TapClick or press space to see the answer
Answer
All 15 cards in this set
Which term describes the information that a program displays on the screen?
Output
What is meant by \n when it is used inside a print instruction?
It starts a new line when the code runs
What is the name for joining two pieces of text together in Python?
Concatenation
What is meant by quotation marks in Python?
Symbols that show where a piece of text starts and ends
What does the print() function do?
It shows the items inside its brackets on the screen
Which line of code correctly outputs the word hello?
print('hello')
What does print(12 + 13) output?
25
What does print('12' + '13') output?
1213
What is displayed by print('Hello\nWorld')?
Hello and World on separate lines
A variable called name holds the text John. What does print('My name is ' + name) display?
My name is John
A variable called score holds 4. What does print('Your score is', score) display?
Your score is 4
A student writes print = (temperature). What happens when the code runs?
Nothing is printed
A variable called message holds the text hello world. What does print(message) display?
Hello world
A student runs a program that contains only the line 12 + 13. What is displayed on the screen?
Nothing
A student wants their program to output the answer to 8 times 3. Which line should they write?
print(8 * 3)