Python

Scripts, tools, and small programs — with honest notes on what broke.

All Marketing Customer Success SEO AI Automation MarTech Python Data Analytics Career Business Learning

Coding Practice ·

Python Coding Exercise #54: String Multiplied

A beginner Python exercise on string repetition — ask for a string and an amount, then print the string that many times on one line using the * operator.

Coding Practice ·

Python Coding Exercise #53: The Sum of Consecutive Numbers

Two beginner Python exercises on a while loop that adds 1, 2, 3 and so on until the total reaches a limit, then builds the calculation as text to print it too.

Coding Practice ·

Python Coding Exercise #52: Powers of Two and Powers of Base n

Two beginner Python exercises on a while loop that multiplies — print the powers of two up to a limit, then change the program so the user chooses the base.

Coding Practice ·

Python Coding Exercise #51: Even Numbers, Countdown and Counting Up

Three beginner Python exercises on while loops with a condition instead of while True — print the even numbers up to 30, fix a broken countdown, and print every number below a limit.

Coding Practice ·

Python Coding Exercise #50: Working with Numbers

A beginner Python exercise on collecting statistics in a loop — read numbers until the user types zero, then print the count, the sum, the mean, and how many numbers were positive and negative.

Coding Practice ·

Python Coding Exercise #49: Story

A beginner Python exercise on building a string inside a loop — collect words from the user until they type "end" or repeat the previous word, and learn how to remember the previous value.

Coding Practice ·

Python Coding Exercise #48: The Next Leap Year

A beginner Python exercise on searching with a while loop — start from the year after the one entered, test each year against the leap year rule, and stop at the first one that fits.

Coding Practice ·

Python Coding Exercise #47: PIN and Number of Attempts

A beginner Python exercise on loops and counters — keep asking for a PIN until it is correct, count the attempts, and print a different message when it takes only one try.

Coding Practice ·

Python Coding Exercise #46: Repeat Password

A beginner Python exercise on loops and input — ask for a password once, then keep asking the user to repeat it until it matches, and learn which lines belong inside the loop and which outside.

Coding Practice ·

Python Coding Exercise #45: Fix the Code: Countdown

A beginner Python debugging exercise on while True and break — a countdown stops after the first number because the break condition is the wrong way round, and the fix is one symbol.