Python Exercises to do

0/85 0 / 85 exercices

HackInScience has been redesigned and renamed Genepy!

Found a bug? Just tell me!

New

Hello World

Solved 38262 times.

  • Basics
New

Print 42

Solved 37900 times.

  • Basics
New

Number of seconds in a year

Solved 28757 times.

  • Basics
New

Using operators

Solved 31099 times.

  • Basics
New

Characters counting

Solved 29819 times.

  • Basics
New

Fix the indentation

Solved 21069 times.

  • Basics
New

Square numbers

Solved 22288 times.

  • Basics
New

Powers of two

Solved 25155 times.

  • Basics
New

Import

Solved 22551 times.

  • Basics
New

Comparisons

Solved 22284 times.

  • Basics
New

Counting Words

Solved 19618 times.

  • Basics
New

Fix is_anagram

Solved 9068 times.

  • Basics
New

First function

Solved 16091 times.

  • Basics
New

Print even numbers

Solved 16115 times.

  • Basics
New

Sum of even numbers <= 100

Solved 15394 times.

  • Basics
  • Training
New

Multiples of 3 and 5

Solved 14015 times.

  • Basics
  • Training
New

Temperatures

Solved 12323 times.

  • Basics
  • Realist
New

Print every two letters pairs

Solved 11317 times.

  • Basics
  • Training
New

Print every pair of distinct letters

Solved 10566 times.

  • Basics
  • Training
New

Longest word

Solved 9599 times.

  • Realist
New

Print sorbet flavors

Solved 8443 times.

  • Realist
New

Distance

Solved 7920 times.

  • Training
New

Is divisible by ?

Solved 3004 times.

  • Training
New

Check if a number is prime

Solved 5652 times.

  • Training
New

Sort students

Solved 4936 times.

  • Realist
New

Print every prime numbers in a range

Solved 3964 times.

  • Training
New

Sum of every prime number below n

Solved 4139 times.

  • Training
New

Next prime

Solved 3026 times.

  • Training
New

Display the date and time

Solved 4475 times.

  • Training
New

The missing card

Solved 2340 times.

  • Realist
New

Reverse Roman Numerals

Solved 2654 times.

  • Realist
New

Friday the 13th

Solved 1835 times.

  • Realist
New

Playing with anagrams

Solved 1292 times.

  • Realist
New

The Fibonacci sequence

Solved 2115 times.

  • Training
New

Currency

Solved 1281 times.

  • Realist
New

Sets of love

Solved 4233 times.

  • Realist
New

Perfect deck shuffle

Solved 1347 times.

  • Realist
New

Exceptions

Solved 1819 times.

  • Training
  • Command line
New

Select students

Solved 2221 times.

  • Realist
New

Flatten lists

Solved 1367 times.

  • Training
New

Print the content of a file

Solved 1636 times.

  • Training
New

Adam Number

Solved 704 times.

  • Training
New

Product of iterable

Solved 1675 times.

  • Training
New

Print battery charge

Solved 1142 times.

  • Realist
New

Draw N Squares

Solved 1022 times.

  • Realist
New

Dyck words

Solved 524 times.

  • Realist
New

Hearts emojis

Solved 879 times.

  • Realist
New

Frequency of letters in a file

Solved 1014 times.

  • Training
New

Pernicious numbers

Solved 982 times.

  • Training
New

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

Solved 1353 times.

  • Training
New

Caesar Cypher

Solved 707 times.

  • Realist
New

Print parameters

Solved 2516 times.

  • Basics
  • Command line
New

Student class

Solved 936 times.

  • Realist
New

Largest product in a series

Solved 884 times.

  • Training
New

Common Lines

Solved 67 times.

  • Command line
New

Format your output

Solved 796 times.

  • Realist
New

Doing HTTP requests

Solved 866 times.

  • Training
New

Consecutive Sum

Solved 421 times.

  • Training
New

Break a safe

Solved 729 times.

  • Realist
New

Longest Collatz sequence

Solved 908 times.

  • Training
New

Print the first parameter

Solved 1823 times.

  • Basics
  • Command line
New

Simple adder

Solved 1739 times.

  • Training
  • Command line
New

Roman Numerals

Solved 584 times.

  • Realist
New

Text framing

Solved 499 times.

  • Realist
New

Calculator

Solved 684 times.

  • Realist
  • Command line
New

Lambda expressions

Solved 739 times.

  • Training
New

Largest product in a grid

Solved 528 times.

  • Training
New

Password Generator

Solved 582 times.

  • Realist
New

Side by side

Solved 426 times.

  • Realist
New

Change for 42€

Solved 272 times.

  • Realist
New

Temperature class

Solved 442 times.

  • Realist
New

Magic Square

Solved 60 times.

  • Realist
New

Pascal's triangle

Solved 388 times.

  • Training
New

Restaurant menu

Solved 249 times.

  • Realist
New

CSV and Python

Solved 311 times.

  • Training
New

Sequence Mining

Solved 194 times.

  • Realist
New

Abelian sandpiles

Solved 221 times.

  • Realist
  • Numpy
New

Elementary cellular automaton

Solved 198 times.

  • Realist
New

bencode, bdecode

Solved 207 times.

  • Realist
New

Fir tree

Solved 170 times.

  • Realist
  • Command line
New

IRC logs as CSV

Solved 126 times.

  • Realist
New

Py Master Mind

Solved 286 times.

  • Realist
New

Dirichlet solver

Solved 98 times.

  • Numpy
New

Make your own 2048 in Python!

Solved 138 times.

  • Numpy
New

Need more exercises ?

Solved 16 times.

  • Realist