Python Exercises

0/85 0 / 85 exercices

Welcome to my small collection of exercises!

Feel free to pick what pleases you in any order!

New

Hello World

Solved 42885 times.

  • Basics
New

Print 42

Solved 42521 times.

  • Basics
New

Number of seconds in a year

Solved 33213 times.

  • Basics
New

Using operators

Solved 35465 times.

  • Basics
New

Characters counting

Solved 28162 times.

  • Basics
New

Fix the indentation

Solved 24965 times.

  • Basics
New

Square numbers

Solved 25835 times.

  • Basics
New

Powers of two

Solved 28528 times.

  • Basics
New

Import

Solved 25858 times.

  • Basics
New

Comparisons

Solved 25186 times.

  • Basics
New

Counting Words

Solved 22350 times.

  • Basics
New

Fix is_anagram

Solved 11651 times.

  • Basics
New

First function

Solved 18420 times.

  • Basics
New

Print even numbers

Solved 18319 times.

  • Basics
New

Sum of even numbers <= 100

Solved 17571 times.

  • Basics
  • Training
New

Multiples of 3 and 5

Solved 16027 times.

  • Basics
  • Training
New

Temperatures

Solved 14210 times.

  • Basics
  • Realist
New

Print every two letters pairs

Solved 13057 times.

  • Basics
  • Training
New

Print every pair of distinct letters

Solved 12219 times.

  • Basics
  • Training
New

Longest word

Solved 11171 times.

  • Realist
New

Print sorbet flavors

Solved 9894 times.

  • Realist
New

Distance

Solved 9341 times.

  • Training
New

Is divisible by ?

Solved 4341 times.

  • Training
New

Check if a number is prime

Solved 6798 times.

  • Training
New

Sort students

Solved 5872 times.

  • Realist
New

Print every prime numbers in a range

Solved 4781 times.

  • Training
New

Sum of every prime number below n

Solved 4882 times.

  • Training
New

Next prime

Solved 3643 times.

  • Training
New

Display the date and time

Solved 5062 times.

  • Training
New

The missing card

Solved 2886 times.

  • Realist
New

Reverse Roman Numerals

Solved 3063 times.

  • Realist
New

Friday the 13th

Solved 2166 times.

  • Realist
New

Playing with anagrams

Solved 1528 times.

  • Realist
New

The Fibonacci sequence

Solved 2447 times.

  • Training
New

Currency

Solved 1543 times.

  • Realist
New

Sets of love

Solved 4464 times.

  • Realist
New

Perfect deck shuffle

Solved 1574 times.

  • Realist
New

Exceptions

Solved 2066 times.

  • Training
  • Command line
New

Select students

Solved 2438 times.

  • Realist
New

Flatten lists

Solved 1562 times.

  • Training
New

Print the content of a file

Solved 1810 times.

  • Training
New

Adam Number

Solved 910 times.

  • Training
New

Product of iterable

Solved 1879 times.

  • Training
New

Print battery charge

Solved 1334 times.

  • Realist
New

Draw N Squares

Solved 1180 times.

  • Realist
New

Dyck words

Solved 646 times.

  • Realist
New

Hearts emojis

Solved 984 times.

  • Realist
New

Frequency of letters in a file

Solved 1127 times.

  • Training
New

Pernicious numbers

Solved 1089 times.

  • Training
New

Count the lower 'e' in the 'words' file

Solved 1478 times.

  • Training
New

Caesar Cypher

Solved 817 times.

  • Realist
New

Print parameters

Solved 2641 times.

  • Basics
  • Command line
New

Student class

Solved 1032 times.

  • Realist
New

Largest product in a series

Solved 981 times.

  • Training
New

Common Lines

Solved 134 times.

  • Command line
New

Format your output

Solved 897 times.

  • Realist
New

Doing HTTP requests

Solved 955 times.

  • Training
New

Consecutive Sum

Solved 538 times.

  • Training
New

Break a safe

Solved 821 times.

  • Realist
New

Longest Collatz sequence

Solved 1003 times.

  • Training
New

Print the first parameter

Solved 1909 times.

  • Basics
  • Command line
New

Simple adder

Solved 1823 times.

  • Training
  • Command line
New

Roman Numerals

Solved 657 times.

  • Realist
New

Text framing

Solved 557 times.

  • Realist
New

Calculator

Solved 738 times.

  • Realist
  • Command line
New

Lambda expressions

Solved 804 times.

  • Training
New

Largest product in a grid

Solved 579 times.

  • Training
New

Password Generator

Solved 646 times.

  • Realist
New

Side by side

Solved 469 times.

  • Realist
New

Change for 42€

Solved 317 times.

  • Realist
New

Temperature class

Solved 489 times.

  • Realist
New

Pascal's triangle

Solved 424 times.

  • Training
New

Magic Square

Solved 91 times.

  • Realist
New

Restaurant menu

Solved 287 times.

  • Realist
New

CSV and Python

Solved 342 times.

  • Training
New

Sequence Mining

Solved 224 times.

  • Realist
New

Abelian sandpiles

Solved 251 times.

  • Realist
  • Numpy
New

Elementary cellular automaton

Solved 225 times.

  • Realist
New

bencode, bdecode

Solved 232 times.

  • Realist
New

Fir tree

Solved 195 times.

  • Realist
  • Command line
New

IRC logs as CSV

Solved 145 times.

  • Realist
New

Py Master Mind

Solved 314 times.

  • Realist
New

Dirichlet solver

Solved 121 times.

  • Numpy
New

Make your own 2048 in Python!

Solved 159 times.

  • Numpy
New

Need more exercises ?

Solved 19 times.

  • Realist