Test 5: Short Questions – Part 2

Short questions

24 questions · 50 min · 52 marks

Want to try first? Take the free Computer Science test: 94hbp-7gz9m-ufent-tsj4r

Sample questions with answers

The first 5 of 24, each with a model answer. Try writing yours first.

  1. Question 1 · 2 marks

    What are operators and operands?

    Show model answer

    Operators are symbols that perform operations on operands (the values or variables they work on).

  2. Question 2 · 2 marks

    What is an expression in Python?

    Show model answer

    An expression is a combination of operators and values that produces a result.

  3. Question 3 · 2 marks

    Name the arithmetic operators in Python.

    Show model answer

    Addition (+), subtraction (-), multiplication (*), division (/), floor division (//), modulus (%), and exponentiation (**).

  4. Question 4 · 2 marks

    If a = 10 and b = 3, what are the results of a / b and a // b?

    Show model answer

    a / b = 3.3333333333333335 (division returns a decimal), while a // b = 3 (floor division).

  5. Question 5 · 2 marks

    What are the modulus and power operators? Give the result for a = 10 and b = 3.

    Show model answer

    The modulus operator % gives the remainder: 10 % 3 = 1. The operator is the power operator: 10 3 = 1000.

More tests in Introduction to Python Programming

Practise with a free account

Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.

Create free account