Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

925 challenges 556 easy 323 medium 46 hard
Python Basics easy

Percentile Calculation

Given a list of numbers and a target value, return the percentile rank of that value in the list.

lists statistics math
+8 pts 10m
Python Basics easy

Euclidean Distance Matrix

Write a function to compute the Euclidean distance between every pair of points from two lists.

math lists loops
+10 pts 15m
Python Basics easy

Cosine Similarity of Vectors

Compute the cosine similarity between two equal-length numeric vectors using pure Python.

math linear-algebra similarity
+10 pts 15m
Python Basics easy

Logging Filter

Given a list of log entries, return those matching a given severity level and containing a keyword.

strings conditionals loops
+8 pts 10m
Python Basics easy

Order by Name

Implement a function that sorts a list of names alphabetically ignoring case, returning a new list.

sorting strings lists
+10 pts 10m
Python Basics easy

Invariant checker

Implement check_invariant(a, b, c) that returns True when a equals b plus c and False otherwise, matching the given examples.

functions conditionals validation
+8 pts 10m
Python Basics easy

Argmax along axis

Write a function that returns index positions of the maximum values along rows or columns of a 2D list.

lists max index
+10 pts 10m
Python Basics easy

Min-Max Scaler: Fit and Transform

Implement a MinMaxScaler class that normalizes numeric data to a given range using fit and transform methods.

scaling normalization class
+8 pts 12m
Python Basics easy

Validate Password Strength

Implement a function that validates password strength based on clear rules.

strings validation conditions
+10 pts 15m
Python Basics medium

Jump Game Minimum Jumps

Given an array of non-negative integers where each element is the maximum jump length, compute the minimum jumps to reach the last index.

arrays greedy minimum-jumps
+20 pts 25m
Strings & Text easy

Reverse a string

Return the characters of the string in reverse order.

strings slicing
+5 pts 5m
Strings & Text easy

Palindrome check

Return True if the string reads the same forwards and backwards (ignoring case and non-alphanumeric).

strings two-pointer
+8 pts 8m
Strings & Text easy

Count vowels

Count the number of vowels (a, e, i, o, u) in a string (case-insensitive).

strings counting
+5 pts 5m
Strings & Text easy

Title case converter

Return the string with each word capitalised.

strings split
+5 pts 5m
Strings & Text easy

Anagram check

Return True if two strings are anagrams of each other.

strings sorting counter
+10 pts 10m
Strings & Text medium

Run-length encoding

Compress consecutive identical characters, e.g. 'aaabbc' → 'a3b2c1'.

strings compression
+20 pts 20m
Strings & Text medium

Longest common prefix

Find the longest common prefix among a list of strings.

strings zip
+18 pts 18m
Strings & Text medium

Integer to Roman

Convert a positive integer to its Roman numeral representation.

strings greedy
+22 pts 22m
Strings & Text medium

Zigzag string conversion

Encode a string in zigzag order across numRows rows, then read row by row.

strings math
+22 pts 20m
Strings & Text easy

Strip and Collapse Whitespace

Write a function that strips leading/trailing whitespace and collapses inner runs of whitespace to single spaces.

strings whitespace normalization
+10 pts 15m
Strings & Text easy

Snake case to camel case

Implement a function that converts snake_case strings to camelCase.

strings case-conversion text-processing
+10 pts 10m
Strings & Text easy

Camel case to snake case

Write a function that converts camelCase input to snake_case while handling acronyms and numbers correctly.

strings case-conversion parsing
+10 pts 15m
Strings & Text easy

Remove punctuation

Write a function that removes all ASCII punctuation characters from a string.

strings punctuation cleaning
+10 pts 10m
Strings & Text easy

Is pangram

Write a function that determines whether a given string is a pangram, ignoring case and non-letter characters.

strings sets algorithm
+8 pts 12m

Showing 97–120 of 925 challenges

Guide: free Python coding challenges

Practice Python by solving problems

PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.

How to use the arena

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. Run tests, fix failures, then try a related quiz or tutorial lesson

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.