Absolute Difference of Two Integers
Compute the absolute difference between two integers, regardless of order.
Simple Interest Calculator
Implement a function that calculates simple interest given principal, annual rate, and time in years.
Tip Calculator
Write a function that calculates the total bill after adding a given tip percentage.
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.
Perimeter of triangle
Given three side lengths, return the perimeter (sum) of the triangle.
Circle Circumference Calculator
Implement a function that computes the circumference of a circle from its radius using the formula 2πr.
Pathlib Operations: File Path Basics
Practice using pathlib to manipulate file paths and extract components.
Count trailing zeros
Write a function that counts the number of trailing zeros in the decimal representation of a positive integer.
Showing 8 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.