Learn Python thanks to the interactive exercises of Genepy!

Enter code and get immediate feedback from our corrector

Basics

  • Hello World
  • Print 42
  • Number of seconds in a year
  • Using operators
  • Characters counting
  • Fix the indentation
  • Square numbers
  • Powers of two
  • Import
  • Comparisons
  • Counting Words
  • Fix is_anagram
  • First function
  • Print even numbers
  • Sum of even numbers <= 100
  • Multiples of 3 and 5
  • Temperatures
  • Print every two letters pairs
  • Print every pair of distinct letters
  • Print parameters
  • Print the first parameter
0/21 0 / 21

Training

  • Sum of even numbers <= 100
  • Multiples of 3 and 5
  • Print every two letters pairs
  • Print every pair of distinct letters
  • Distance
  • Check if a number is prime
  • Print every prime numbers in a range
  • Sum of every prime number below n
  • Next prime
  • Display the date and time
  • The Fibonacci sequence
  • Flatten lists
  • Exceptions
  • Print the content of a file
  • Is divisible by ?
  • Adam Number
  • Product of iterable
  • Frequency of letters in a file
  • Pernicious numbers
  • Count the lower 'e' in the 'words' file
  • Largest product in a series
  • Doing HTTP requests
  • Longest Collatz sequence
  • Simple adder
  • Consecutive Sum
  • Lambda expressions
  • Largest product in a grid
  • Pascal's triangle
  • CSV and Python
0/29 0 / 29

Realist

  • Temperatures
  • Longest word
  • Print sorbet flavors
  • Sort students
  • Reverse Roman Numerals
  • The missing card
  • Friday the 13th
  • Playing with anagrams
  • Currency
  • Perfect deck shuffle
  • Print battery charge
  • Draw N Squares
  • Dyck words
  • Hearts emojis
  • Caesar Cypher
  • Student class
  • Format your output
  • Break a safe
  • Roman Numerals
  • Text framing
  • Calculator
  • Password Generator
  • Side by side
  • Change for 42€
  • Sequence Mining
  • Temperature class
  • Magic Square
  • Restaurant menu
  • Abelian sandpiles
  • Elementary cellular automaton
  • bencode, bdecode
  • Fir tree
  • IRC logs as CSV
  • Need more exercises ?
  • Sets of love
  • Select students
  • Py Master Mind
0/37 0 / 37

Command line

  • Print parameters
  • Print the first parameter
  • Simple adder
  • Calculator
  • Fir tree
0/5 0 / 5

Numpy

  • Abelian sandpiles
  • Dirichlet solver
  • Make your own 2048 in Python!
0/3 0 / 3
104 exercises
and counting!
categories of exercises
Exercises are sorted by tags so you can pick whatever you want to learn.
7849 shared solutions
Reading shared solutions is also a nice way to learn, thanks a lot to people sharing their code!

Leaderboards

Follow leaderboards in real time

Individual

Teams

You are a teacher?

Customize your courses!

Adapt Genepy to your students' level
  • Create one or many dedicated pages
  • Select existing exercises
  • Or write your own exercises!
Keep track of your groups' progress
Thanks to a dedicated interface, consult your groups' reports and keep track of their progress.

You like Genepy?

Genepy is free, open-source, ad-free and tracker-free

Maintained on a voluntary basis by a team of Python enthusiasts, the platform runs solely on your donations. To keep it going, please support us!

Learn more about donations and sponsoring