Back to Learning Hub

Day 2: Python variable and print function

9 questions • Select the best answer for each question

Question 1

True or False: Indentation in Python is for readability only.

Question 2

Insert the missing part of the code below to output "Hello World". _______("Hello World")

Question 3

Complete the code block, print "Yes" if 5 is larger than 2. if 5 > 2: __________

Question 4

What type of data can be stored in a variable?

Question 5

Which Python function is used to display variables and text on the screen?

Question 6

What is the purpose of using end=" " in the print function?

Question 7

By default, what does the print() function do after printing output?

Question 8

Which of the following correctly assigns a string to a variable in Python?

Question 9

What will be the output of the following code? x = 10 print(x)