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

Absolute Difference of Two Integers

Compute the absolute difference between two integers, regardless of order.

absolute difference math
+5 pts 5m
Python Basics easy

Grade Calculator

Implement a function that converts a numeric score to a letter grade using a standard scale.

conditionals functions basic-syntax
+8 pts 10m
Python Basics easy

Simple Interest Calculator

Implement a function that calculates simple interest given principal, annual rate, and time in years.

arithmetic floats basics
+5 pts 5m
Python Basics easy

Tip Calculator

Write a function that calculates the total bill after adding a given tip percentage.

arithmetic rounding basics
+8 pts 10m
Python Basics easy

Count Positives

Count the positive numbers in a list of integers.

conditionals loops basic
+10 pts 10m
Python Basics easy

Is divisible by?

Create a function that returns True if a is divisible by b with no remainder, with a clear definition of edge cases.

division modulo conditionals
+10 pts 10m
Python Basics easy

Perimeter of triangle

Given three side lengths, return the perimeter (sum) of the triangle.

arithmetic geometry basics
+5 pts 5m
Python Basics easy

Circle Circumference Calculator

Implement a function that computes the circumference of a circle from its radius using the formula 2πr.

math function basics
+10 pts 10m
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

Count trailing zeros

Write a function that counts the number of trailing zeros in the decimal representation of a positive integer.

loops integers basics
+5 pts 5m

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