Podcast
Questions and Answers
Which command in Python is used to output a value to the console?
Which command in Python is used to output a value to the console?
- display()
- input()
- print() (correct)
- output()
What does the escape sequence '
' do in Python?
What does the escape sequence ' ' do in Python?
- Prints a quotation mark
- Prints a tab
- Prints a new line (correct)
- Prints a backslash
In the example code, what will be the output of the following line: print('Bonjour.')?
In the example code, what will be the output of the following line: print('Bonjour.')?
- Hello world.
- Bonjour. (correct)
- Salamu.
- Ola.
What data type can be passed as an argument to the print() method in Python?
What data type can be passed as an argument to the print() method in Python?
How many times will the print() method be called in the following code? print('Hello')
print('World')
How many times will the print() method be called in the following code? print('Hello') print('World')