HTTP/2 301
server: nginx
date: Fri, 26 Dec 2025 20:38:09 GMT
content-type: text/html
content-length: 162
location: https://genepy.org/
strict-transport-security: max-age=63072000
HTTP/2 200
server: nginx
date: Fri, 26 Dec 2025 20:38:11 GMT
content-type: text/html; charset=utf-8
x-frame-options: DENY
vary: Accept-Language, Cookie
content-language: en
x-content-type-options: nosniff
referrer-policy: same-origin
cross-origin-opener-policy: same-origin
strict-transport-security: max-age=63072000
content-security-policy: default-src 'self'; connect-src 'self' wss://genepy.org; img-src data: 'self';
permissions-policy: interest-cohort=()
content-encoding: gzip
Genepy — Python Exercises
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
Training
- Sum of even numbers <= 100
- Multiples of 3 and 5
- Print every two letters pairs
- Print every pair of distinct letters
- Distance
- Is divisible by ?
- 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
- Exceptions
- Flatten lists
- Print the content of a file
- 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
- Consecutive Sum
- Longest Collatz sequence
- Simple adder
- Lambda expressions
- Largest product in a grid
- Pascal's triangle
- CSV and Python
Realist
- Temperatures
- Longest word
- Print sorbet flavors
- Sort students
- The missing card
- Reverse Roman Numerals
- Friday the 13th
- Playing with anagrams
- Currency
- Sets of love
- Perfect deck shuffle
- Select students
- 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€
- Temperature class
- Magic Square
- Restaurant menu
- Sequence Mining
- Abelian sandpiles
- Elementary cellular automaton
- bencode, bdecode
- Fir tree
- IRC logs as CSV
- Py Master Mind
- Need more exercises ?
Command line
- Exceptions
- Print parameters
- Common Lines
- Print the first parameter
- Simple adder
- Calculator
- Fir tree
Numpy
- Abelian sandpiles
- Dirichlet solver
- Make your own 2048 in Python!
-
142 exercises
-
and counting!
-
categories of exercises
-
Exercises are sorted by tags so you can pick whatever you want to learn.
-
10054 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
-
entwanne
3263 points
-
Melcore
3263 points
-
vpoulailleau
3263 points
Teams
-
AFPy
3208 points
-
Oteria
2786 points
-
Zeste de Savoir
2691 points
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