Menu

Output

Card 1 of 19 0 got it 0 still learning
Question
TapClick or press space to see the answer
Answer
All 19 cards in this set
Which term describes the data that a program sends out, such as text shown on the screen?
Output
What is meant by a string?
A sequence of characters treated as text, written inside quotation marks in a program
Which term describes a combination of values and operators, such as 3 + 4, that is worked out before its result is displayed?
Expression
Which term describes the marks that must be placed at both ends of a piece of text in a print() call?
Quotation marks
What is meant by Python being case sensitive?
Capitals and small letters are treated as different characters
What is meant by printing a variable?
Displaying the value that is stored in the variable
What does the print() function do when a Python program runs?
It displays output on the screen
A program contains the line print('total'). What appears on the screen?
The word total
What appears on the screen when print(3 + 4) runs?
The number 7
What appears on the screen when print('Good' + 'morning') runs?
Goodmorning
A variable called age holds the value 15. What appears on the screen when print('Age:', age) runs?
Age: 15
A program contains the line print('Age: ' + 15). What happens when the program runs?
An error stops the program
A print line has a single quotation mark at the start of the text and a double quotation mark at the end. Why does the program stop with an error?
The quotation marks at each end do not match
In Python, why does the line print 'Hello' stop with an error?
The brackets around the text are missing
What does this program print?
The words cat and dog on separate lines
What does this program print?
A, then a blank line, then B
A student writes print(Hello) so that the word Hello will appear on the screen, but the program stops with an error. Why?
Hello is read as a variable name that has no value stored in it
What does this program print?
7 on the first line, then the text 3 + 4
A program draws a shape made of stars using one print() call for each line of the shape. Why is a separate print() call used for each line?
Each print() call puts its output on a new line