Enumerate with start
Implement a function that mimics Python's enumerate with a custom start index.
Palindromic Number Check
Write a function to check if a given integer is a palindrome.
Hexagonal Number
Write a function to check if a positive integer is a hexagonal number.
Count trailing zeros
Write a function that counts the number of trailing zeros in the decimal representation of a positive integer.
Count Leading Zeros
Write a function that returns the number of leading zeros in a list of integers.
Convolve 1D signal
Implement a 1D convolution function with three modes using pure Python.
Guess Number Game
Simulate a number guessing game with attempts, feedback, and a win/lose result.
Basic Calculator
Implement a function that evaluates a simple arithmetic expression with +, -, *, / and parentheses.
Copy deep vs shallow
Predict and write a function that returns a copied list and inspect whether nested modification affects the original.
Limit and Offset Query
Write a function that returns a page from a dataset given limit and offset.
Insert New Row
Implement a function that inserts a new row into a 2D list at a specified index.
Array mean and std
Implement the function array_stats that returns the mean and population standard deviation of a list of numbers.
Reshape array dimensions
Implement a function that reshapes a 1D list into a 2D list with given dimensions.
Cumulative Sum Vectorized
Implement a function that returns the cumulative sum of a list of numbers.
Element-wise Clip
Implement a function that clips each element of a list to a specified range.
Euclidean Distance Matrix
Write a function to compute the Euclidean distance between every pair of points from two lists.
Order by Name
Implement a function that sorts a list of names alphabetically ignoring case, returning a new list.
Invariant checker
Implement check_invariant(a, b, c) that returns True when a equals b plus c and False otherwise, matching the given examples.
Argmax along axis
Write a function that returns index positions of the maximum values along rows or columns of a 2D list.
Validate Password Strength
Implement a function that validates password strength based on clear rules.
Showing 49–68 of 68 challenges · Python Basics
Python Basics — Python coding challenges
What you will find here
This page lists python basics challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.