September 3, 2026

Python Programming Quiz

Updated August 2026 — quiz hub restored (interactive HDquiz embed was lost; practice questions are inline below).

Welcome to the Python Programming Quiz hub on The Genius Blog. Use these questions to check fundamentals, then follow the tutorial links to go deeper.

Related on this blog:

We will cover:

  1. Warm-up questions
  2. Lists and loops
  3. Functions
  4. Answers

1. Warm-up questions

  1. What does type(3.0) return in Python 3?
  2. Is x = 1 followed by x = "hi" legal?
  3. What is the result of True + True?

2. Lists and loops

  1. What does [1, 2, 3][-1] evaluate to?
  2. How do you make a shallow copy of list a without sharing identity?
  3. What does this print?
    for i in range(3):
        print(i, end="-")
    

3. Functions

  1. What is the default return value of a function with no return?
  2. Does Python pass arguments by value or by object reference?
  3. Write a one-liner that doubles every element of nums using a list comprehension.

4. Answers

  1. <class 'float'>
  2. Yes — variables are names bound to objects; types can change.
  3. 2 (booleans subclass int)
  4. 3
  5. a.copy() or a[:] or list(a)
  6. 0-1-2-
  7. None
  8. By object reference (names refer to objects; mutable objects can change in place)
  9. [n * 2 for n in nums]

Score yourself honestly, then open a tutorial from the links above and rebuild anything you missed. For more interactive quizzes historically hosted via HDquiz, treat this page as the stable index going forward.

Kindson Munonye

Kindson Munonye is a software engineer and technical author covering machine learning, statistics, REST APIs, Python, and software engineering. He publishes free tutorials on The Genius Blog and live classes on Alkademy. GitHub · LinkedIn · About · Alkademy

View all posts by Kindson Munonye →
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted