2. Programming

Programming Basics — Quiz

Test your understanding of programming basics with 5 practice questions.

Read the lesson first

Practice Questions

Question 1

Evaluate the expression 2 + 3 * 4 ** 2 // (5 - 1) in Python.

Question 2

What is the result of the chained comparison 3 < 5 > 4 in Python?

Question 3

What does the expression 0.1 + 0.2 == 0.3 evaluate to in Python?

Question 4

In Python, how many times is function f() called in the expression f() and f() if f() always returns False?

Question 5

Given def add(x, lst=[]): lst.append(x); return lst, what is printed by print(add(1)); print(add(2))?
Programming Basics Quiz — AS-Level Computer Science | A-Warded