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

Leap Year Checker

Implement a function that decides whether a year is a leap year according to the standard Gregorian rules.

boolean conditionals date
+5 pts 5m
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

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
Advanced Python hard

Validated descriptor

Implement a TypedField descriptor that raises TypeError if the value is not of the expected type.

descriptors OOP metaclass
+40 pts 35m
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 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
Datetime & Time Calculations easy

Days in month

Write a function that returns the number of days in a given month and year, correctly handling leap years.

datetime calendar leap-year
+8 pts 10m

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