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

FizzBuzz, precisely

Return a newline-separated string for 1..n: Fizz, Buzz, FizzBuzz, or the number.

control flow strings modulo
2
+10 pts 12m
Python Basics easy

Hello, name!

Implement a function that returns a personalized greeting for a given name.

strings function formatting
+5 pts 5m
Python Basics easy

Minutes to Hours: Time Conversion Helper

Write a function that converts minutes into a human-readable 'Xh Ym' string, with special cases for zero and whole hours.

arithmetic formatting conditionals
+8 pts 10m
Python Basics easy

Countdown printer

Implement a function that prints a countdown from a given number down to 1, then returns 'Go!'.

loops conditionals function-definition
+5 pts 5m
Python Basics easy

Print Pyramid Pattern

Implement a function that returns a centered asterisk pyramid as a list of strings.

loops strings pattern-printing
+10 pts 15m
Python Basics easy

Count word occurrences

Write a function that takes a sentence and returns a dictionary of word counts.

strings counting dictionaries
+10 pts 15m
Python Basics easy

Pathlib Operations: File Path Basics

Practice using pathlib to manipulate file paths and extract components.

pathlib file-paths strings
+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
Python Basics easy

Palindromic Number Check

Write a function to check if a given integer is a palindrome.

numbers strings conditionals
+10 pts 10m
Python Basics medium

Longest Substring with K Repeating Characters

Return the length of the longest substring of a given string in which every character appears at least K times.

strings sliding-window substring
+18 pts 20m
Python Basics easy

Parse environment variables

Write parse_env_vars that parses KEY=VALUE lines into a dict, converting booleans/numbers and ignoring comments.

strings parsing dictionaries
+8 pts 15m
Python Basics easy

Rank Employees by Salary

Sort a list of employee dictionaries by salary descending, tie-break by name, and return ranked strings.

sorting dictionaries lists
+8 pts 10m
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

Validate Password Strength

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

strings validation conditions
+10 pts 15m

Showing 1–15 of 15 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.