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 46018 times.

  • Basics
New

Print 42

Solved 45646 times.

  • Basics
New

Number of seconds in a year

Solved 36197 times.

  • Basics
New

Using operators

Solved 38381 times.

  • Basics
New

Characters counting

Solved 30764 times.

  • Basics
New

Fix the indentation

Solved 27520 times.

  • Basics
New

Square numbers

Solved 28158 times.

  • Basics
New

Powers of two

Solved 30719 times.

  • Basics
New

Import

Solved 27990 times.

  • Basics
New

Comparisons

Solved 27057 times.

  • Basics
New

Counting Words

Solved 24096 times.

  • Basics
New

Fix is_anagram

Solved 13292 times.

  • Basics
New

First function

Solved 19910 times.

  • Basics
New

Print even numbers

Solved 19757 times.

  • Basics
New

Sum of even numbers <= 100

Solved 18985 times.

  • Basics
  • Training
New

Multiples of 3 and 5

Solved 17353 times.

  • Basics
  • Training
New

Temperatures

Solved 15417 times.

  • Basics
  • Realist
New

Print every two letters pairs

Solved 14166 times.

  • Basics
  • Training
New

Print every pair of distinct letters

Solved 13270 times.

  • Basics
  • Training
New

Longest word

Solved 12167 times.

  • Realist
New

Print sorbet flavors

Solved 10805 times.

  • Realist
New

Distance

Solved 10220 times.

  • Training
New

Is divisible by ?

Solved 5130 times.

  • Training
New

Check if a number is prime

Solved 7478 times.

  • Training
New

Sort students

Solved 6442 times.

  • Realist
New

Print every prime numbers in a range

Solved 5290 times.

  • Training
New

Sum of every prime number below n

Solved 5331 times.

  • Training
New

Next prime

Solved 4002 times.

  • Training
New

Display the date and time

Solved 5425 times.

  • Training
New

The missing card

Solved 3231 times.

  • Realist
New

Reverse Roman Numerals

Solved 3349 times.

  • Realist
New

Friday the 13th

Solved 2363 times.

  • Realist
New

Playing with anagrams

Solved 1694 times.

  • Realist
New

The Fibonacci sequence

Solved 2646 times.

  • Training
New

Currency

Solved 1708 times.

  • Realist
New

Sets of love

Solved 4617 times.

  • Realist
New

Perfect deck shuffle

Solved 1713 times.

  • Realist
New

Exceptions

Solved 2193 times.

  • Training
  • Command line
New

Select students

Solved 2572 times.

  • Realist
New

Flatten lists

Solved 1682 times.

  • Training
New

Print the content of a file

Solved 1920 times.

  • Training
New

Adam Number

Solved 1036 times.

  • Training
New

Product of iterable

Solved 2003 times.

  • Training
New

Print battery charge

Solved 1446 times.

  • Realist
New

Draw N Squares

Solved 1301 times.

  • Realist
New

Dyck words

Solved 734 times.

  • Realist
New

Hearts emojis

Solved 1067 times.

  • Realist
New

Frequency of letters in a file

Solved 1209 times.

  • Training
New

Pernicious numbers

Solved 1167 times.

  • Training
New

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

Solved 1558 times.

  • Training
New

Caesar Cypher

Solved 900 times.

  • Realist
New

Print parameters

Solved 2761 times.

  • Basics
  • Command line
New

Student class

Solved 1119 times.

  • Realist
New

Largest product in a series

Solved 1051 times.

  • Training
New

Format your output

Solved 966 times.

  • Realist
New

Common Lines

Solved 180 times.

  • Command line
New

Doing HTTP requests

Solved 1014 times.

  • Training
New

Consecutive Sum

Solved 613 times.

  • Training
New

Break a safe

Solved 889 times.

  • Realist
New

Longest Collatz sequence

Solved 1072 times.

  • Training
New

Print the first parameter

Solved 1991 times.

  • Basics
  • Command line
New

Simple adder

Solved 1879 times.

  • Training
  • Command line
New

Roman Numerals

Solved 703 times.

  • Realist
New

Text framing

Solved 595 times.

  • Realist
New

Calculator

Solved 780 times.

  • Realist
  • Command line
New

Lambda expressions

Solved 851 times.

  • Training
New

Largest product in a grid

Solved 612 times.

  • Training
New

Password Generator

Solved 690 times.

  • Realist
New

Side by side

Solved 504 times.

  • Realist
New

Change for 42€

Solved 355 times.

  • Realist
New

Temperature class

Solved 525 times.

  • Realist
New

Magic Square

Solved 116 times.

  • Realist
New

Pascal's triangle

Solved 460 times.

  • Training
New

Restaurant menu

Solved 317 times.

  • Realist
New

CSV and Python

Solved 370 times.

  • Training
New

Sequence Mining

Solved 257 times.

  • Realist
New

Abelian sandpiles

Solved 274 times.

  • Realist
  • Numpy
New

Elementary cellular automaton

Solved 245 times.

  • Realist
New

bencode, bdecode

Solved 251 times.

  • Realist
New

Fir tree

Solved 210 times.

  • Realist
  • Command line
New

IRC logs as CSV

Solved 160 times.

  • Realist
New

Py Master Mind

Solved 328 times.

  • Realist
New

Dirichlet solver

Solved 140 times.

  • Numpy
New

Make your own 2048 in Python!

Solved 182 times.

  • Numpy
New

Need more exercises ?

Solved 20 times.

  • Realist