4. Topic 4(COLON) Programming Fundamentals

Lesson 4.2: Variables, Data Types And Input And Output — Quiz

Test your understanding of lesson 4.2: variables, data types and input and output with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

What is the output of the following Python code: print(type(10))?

Question 2

What is the output of the following Python code?

python
\nname = 'Alice'\nage = 30\nprint('Name:', name, 'Age:', age)\n

Question 3

What is the result of executing the following Python code?

python
\nnum = 5.75\nint_num = int(num)\nprint(int_num)\n

Question 4

Which of the following statements correctly assigns a Boolean value in Python?

Consider the variable is_true.

Question 5

What would the following Python snippet output?

python
\nvalue = '100'\nresult = int(value) + 50\nprint(result)\n