šŸŸļø Python Practice Arena

25 mixed challenges — because reading code is not learning code

← Back to Python Hub

šŸ’Ŗ How to practice properly

Nobody learned to ride a bike by watching videos about bikes. Programming is exactly the same: you only really learn it by typing code, breaking it, and fixing it. This page is your gym.

  • Type every line yourself — no copy-paste. Your fingers learn too.
  • Guess the answer first, then press ā–¶ Run and see if you were right.
  • Get stuck for a while. Ten minutes of being stuck teaches more than the solution does.
  • Only then press šŸ’” Solution — and afterwards, close it and write the whole thing again from memory.
  • Three challenges a day beats twenty challenges once a month. šŸ“…

The challenges mix everything from the whole course: variables, loops, lists, dictionaries, functions, classes and algorithms. If one uses something you have not met yet, go and read that lesson — then come back and beat it. 🄊

šŸ”„ Warm-Up Round

Five to ten minutes each. Perfect for a daily practice session — do three every day and you will be amazed in a month.

šŸ›’

Challenge 1: Numbered Shopping List

Easy

Print the list ["milk", "eggs", "bread"] as a numbered list: 1. milk and so on.

1. milk 2. eggs 3. bread

                
āž•

Challenge 2: Even Numbers Total

Easy

Add up every even number from 1 to 20 and print the total.

110

                
šŸ…°ļø

Challenge 3: Count the Vowels

Easy

Count how many vowels (a, e, i, o, u) are in "programming is powerful" and print the number.

7

                
šŸ„‡

Challenge 4: Biggest of Three

Easy

Without using max(), print the biggest of a = 17, b = 42 and c = 23.

42

                
šŸ”„

Challenge 5: Backwards List

Easy

Print [1, 2, 3, 4, 5] reversed — first with slicing [::-1], then by looping backwards with range(len(items) - 1, -1, -1) printing one per line.

[5, 4, 3, 2, 1] 5 4 3 2 1

                
šŸŒ”ļø

Challenge 6: Temperature Table

Easy

Print a small conversion table for 0, 10, 20 and 30 °C in the form 0C = 32.0F. Formula: c * 9 / 5 + 32.

0C = 32.0F 10C = 50.0F 20C = 68.0F 30C = 86.0F

                
āœļø

Challenge 7: Initials Maker

Easy

Turn "grace brewster hopper" into G.B.H. — split the name, take each first letter, uppercase it and add a dot.

G.B.H.

                
šŸ”¢

Challenge 8: Digit Sum

Easy

Add up the digits of 9174 (9 + 1 + 7 + 4) and print the answer. Use % and //, or turn it into text — your choice.

21

                

🧠 Brain Builders

These take real thinking. Read the goal twice, plan on paper, then code. Getting stuck is part of the exercise — stay with it before peeking at the solution.

šŸ”

Challenge 9: Password Generator

Medium

Using random.seed(7) so the answer is the same every run, build an 8-character password by picking random letters from "abcdefghijkmnpqrstuvwxyz23456789". Print it.

wj3degzd

                
šŸ“

Challenge 10: Sentence Statistics

Medium

For "the quick brown fox jumps over the lazy dog", print the number of words, the longest word, and the average word length rounded to 2 decimals.

9 quick 3.89

                
šŸ”Ž

Challenge 11: Second Largest

Medium

Find the second largest number in [12, 45, 7, 98, 33, 98] — careful, the biggest number appears twice, and the answer is 45, not 98!

45

                
🧮

Challenge 12: Prime Checker

Medium

Write is_prime(n) (a number bigger than 1 with no divisors except 1 and itself), then print every prime from 1 to 30 on one line.

2 3 5 7 11 13 17 19 23 29

                
šŸ•µļø

Challenge 13: Caesar Cipher

Medium

Shift every letter of "attack at dawn" three places along the alphabet (a→d, z→c), leaving spaces alone. Print the secret message.

dwwdfn dw gdzq

                
šŸ“Š

Challenge 14: Class Report

Medium

From grades = {"Ana": 88, "Ben": 61, "Cy": 94, "Di": 72}, print the average (2 decimals), the top student's name, and how many scored 70 or more.

78.75 Cy 3

                
🐚

Challenge 15: Fibonacci List

Medium

Build a list of the first 12 Fibonacci numbers (each one is the sum of the two before, starting 0, 1) and print the list.

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]

                
šŸŽÆ

Challenge 16: Guess Checker

Medium

Without any input(), simulate a guessing game: secret = 42 and guesses = [10, 60, 40, 42, 7]. Print too low, too high or correct! for each guess, and stop as soon as it is correct.

too low too high too low correct!

                

šŸ‘‘ Boss Battles

The big ones. Each of these is a real classic that programmers meet in interviews and competitions. Take your time — half an hour on one of these teaches more than an hour of easy tasks.

šŸŒ€

Challenge 17: Collatz Sequence

Boss

Start at 27. If the number is even, halve it; if it is odd, triple it and add one. Repeat until you reach 1, counting the steps. Print how many steps it took (it is famously more than you expect!).

111

                
ā­•

Challenge 18: Tic-Tac-Toe Judge

Boss

The board is [["X", "O", "O"], ["O", "X", "O"], ["O", "O", "X"]]. Check all three rows, all three columns and both diagonals, then print the winner (X) or nobody.

X

                
šŸ›ļø

Challenge 19: Roman Numerals

Boss

Turn 1994 into MCMXCIV. Work through the values from biggest to smallest (1000=M, 900=CM, 500=D, 400=CD, 100=C, 90=XC, 50=L, 40=XL, 10=X, 9=IX, 5=V, 4=IV, 1=I), subtracting as you go.

MCMXCIV

                
0ļøāƒ£

Challenge 20: Decimal to Binary

Boss

Convert 156 into binary without using bin(): keep dividing by 2 and collecting the remainders backwards. Print your answer, then print bin(156)[2:] to prove it matches.

10011100 10011100

                
šŸ¦

Challenge 21: Bank Account Class

Boss

Write an Account class with deposit, withdraw (refusing overdrafts) and history() returning the list of every transaction. Deposit 100, withdraw 30, try to withdraw 500, then print the balance and the history.

70 ['+100', '-30', 'refused 500']

                
šŸ—ŗļø

Challenge 22: Word Ladder Counter

Boss

Two words are "neighbors" if they differ in exactly one letter. From ["cold", "cord", "card", "ward", "warm"], print each neighboring pair like cold-cord, one per line.

cold-cord cord-card card-ward ward-warm

                

šŸŽØ Creative Lab

No right answers here — just build something you think is cool and show someone. This is where practice turns into real programming.

šŸŽŖ

Challenge 23: Free Play — Your Own Quiz

Creative

Build a 5-question quiz about anything you love. Keep the questions and answers in a list or dictionary, ask them with input(), count the score, and print a fun ending message. šŸ†


                
šŸ–Œļø

Challenge 24: Free Play — ASCII Animation

Creative

Use loops and print() to make something move down the screen: a falling star, a growing tree, a rocket climbing. Print many frames one after another. šŸš€


                
🧩

Challenge 25: Free Play — Invent a Challenge

Creative

Invent a practice task you think would be hard for a friend, then solve it yourself. Write the goal as a comment at the top, then the code below. Making good problems is how teachers learn too! šŸ’”