---
title: Introduction to Python
description: Test your basic Python knowledge
points_per_question: 1
shuffle_answers: true
---

# Python Basics

## Question 1
[Type: multiple_choice]
[Points: 1]

What is the output of `print(2 ** 3)` in Python?

a) 5
b) 6
*c) 8
d) 9

Feedback: The ** operator is exponentiation, so 2 ** 3 = 2 × 2 × 2 = 8

## Question 2
[Type: multiple_choice]

Which of the following is NOT a built-in Python data type?

a) str
b) list
c) dict
*d) array

Feedback: array is from the NumPy library, not a built-in Python type

## Question 3
[Type: true_false]

In Python, lists are mutable and tuples are immutable.

*a) True
b) False

Feedback: Correct! This is a key difference between lists and tuples.

## Question 4
[Type: multiple_choice]

What does the `len()` function do?

a) Returns the length of a string only
*b) Returns the number of items in an object
c) Returns the line number in code
d) It's not a real function

Feedback: `len()` returns the length of any sequence or collection (string, list, tuple, etc.)

## Question 5
[Type: true_false]

Python uses indentation for code blocks (if, for, while, function definitions).

*a) True
b) False

Feedback: Whitespace and indentation are significant in Python!
