FizzBuzz, precisely
Return a newline-separated string for 1..n: Fizz, Buzz, FizzBuzz, or the number.
Temperature converter
Convert Celsius to Fahrenheit: F = C × 9/5 + 32.
Even or odd?
Return 'even' or 'odd' for an integer.
Sum of digits
Return the sum of all decimal digits of a non-negative integer.
Collatz steps
Count how many steps the Collatz sequence takes to reach 1 from n.
Factorial (iterative)
Compute n! iteratively without recursion.
Power of two?
Return True if n is an exact power of 2.
GCD via Euclid
Compute the greatest common divisor of two positive integers.
Fibonacci(n)
Return the nth Fibonacci number efficiently.
Prime checker
Return True if n is a prime number.
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.