Practice Arena

Python Coding Challenges

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

467 challenges 330 easy 120 medium 17 hard
Python Basics easy

Classify triangle by sides

Write a function that classifies a triangle based on three side lengths.

conditionals geometry validation
+8 pts 10m
Python Basics easy

Validate date format

Return True if input string is exactly YYYY-MM-DD and a real calendar date.

validation strings dates
+10 pts 10m
Strings & Text easy

Is isogram

Implement a function that determines whether a string is an isogram (no repeated letters, case-insensitive).

strings case-insensitive validation
+10 pts 10m
Strings & Text easy

Is pangram?

Implement is_pangram(s) to return True if the string contains every letter from 'a' to 'z' at least once, ignoring case and non-alphabetic characters.

strings set validation
+8 pts 10m
Strings & Text easy

Mask email address

Given an email address, return a masked version that hides everything but the first and last character of the local part and the domain.

strings masking validation
+8 pts 10m
Strings & Text easy

Is isogram?

Write a function that checks whether a given word is an isogram, ignoring letter case and only considering alphabetic characters.

strings case-insensitive set
+8 pts 12m
Strings & Text easy

Validate time format

Check whether a given string is a valid 24-hour time in HH:MM format.

strings validation time
+10 pts 15m
Strings & Text easy

Validate username format

Implement a function that validates a username according to length, allowed characters, and no consecutive underscores.

strings validation returns
+8 pts 12m
Error Handling & Exceptions easy

Safe int parser

Implement safe_parse_int that converts a string to an int, returning a default value on failure.

exceptions parsing validation
+10 pts 10m
Error Handling & Exceptions easy

Safe Float Parser

Write a function that safely converts a string to a float, returning None for invalid inputs.

float exception parsing
+10 pts 10m
Regular Expressions medium

Validate Email Regex

Implement a function that validates email addresses using regex with specific rules.

regex email validation
+20 pts 25m
Regular Expressions easy

Validate phone number

Write a function that uses regular expressions to determine if a given string is a valid US phone number.

regex validation phone
+10 pts 15m
Regular Expressions easy

Match IPv4 Address

Write a function that uses a regular expression to check if a string is a valid IPv4 address.

regex validation ipv4
+8 pts 12m
Regular Expressions hard

Match IPv6 Address

Write a function that uses a regex to validate whether a string is a fully expanded IPv6 address.

regex validation ipv6
+25 pts 30m
Regular Expressions medium

Match Credit Card Pattern

Write a function that validates a credit card number string against a set of formatting rules.

regex validation credit-card
+25 pts 25m
Regular Expressions easy

Validate Hex Color Code

Write a function that validates hex color codes using regular expressions.

regex validation strings
+10 pts 10m
Regular Expressions easy

Lookahead Validation

Write a regex-based function to check if a password meets length and character class requirements.

regex lookahead validation
+8 pts 10m
Math & Number Theory easy

Armstrong Number Check

Implement a function that checks if a given integer is an Armstrong number.

arithmetic number-theory validation
+10 pts 10m
Graphs & Graph Algorithms medium

Bipartite Graph Check

Implement a function to check if an undirected graph is bipartite using graph coloring.

graphs bfs coloring
+25 pts 30m
Stacks & Queues easy

Balanced brackets in string

Check if a string of brackets is properly balanced using a stack-based approach.

stack string parsing
+10 pts 15m
Matrix & 2D Arrays easy

Valid Sudoku Board

Determine if a 9x9 Sudoku board is valid by checking rows, columns, and 3x3 sub-boxes.

matrix set validation
+10 pts 15m

Showing 21 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.