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 #24: Binary, Octal and Hexadecimal

A beginner Python exercise on number systems — convert a decimal integer to binary, octal and hexadecimal with the built-in functions bin(), oct() and hex(), and learn what the 0b, 0o and 0x prefixes mean.

Coding Practice ·

Python Coding Exercise #23: Slicing and the min() and max() Functions

Two short beginner Python exercises — use string slicing to print the last three digits of a phone number, and use the built-in min() and max() functions to find the smallest and largest of four numbers.

Coding Practice ·

Python Coding Exercise #22: Area and Circumference of a Circle

A beginner Python exercise on the math module — read a radius, calculate a circle's area and circumference using pi, and round the answers to two decimal places.

Coding Practice ·

Python Coding Exercise #21: Grams to Kilograms

A beginner Python exercise on unit conversion — turn a whole number of grams into kilograms and leftover grams, then polish the output so singular and plural words and zero values read correctly.

Coding Practice ·

Python Coding Exercise #20: What to Wear Tomorrow

A beginner Python exercise on comparison conditions — turn "over 20, 10 or 5 degrees" into the right if statements, learn how to pick between <, <=, > and >=, and practise with boundary values.

Coding Practice ·

Python Coding Exercise #19: Loyalty Bonus

A beginner Python debugging exercise on if and else — why two separate if statements can both run when the first one changes the variable the second one checks, and how to fix it.

Coding Practice ·

Python Coding Exercise #18: Daily Wages

A beginner Python exercise on if statements and arithmetic — calculate a day's pay from the hourly wage and hours worked, with double pay on Sundays.

Coding Practice ·

Python Coding Exercise #17: Temperatures

A beginner Python exercise that converts Fahrenheit to Celsius and prints an extra message when the result is below zero — practice with formulas, floats and if statements.

Coding Practice ·

Python Coding Exercise #16: Calculator

A beginner Python exercise on comparing strings with if statements — build a small calculator that adds, subtracts or multiplies two numbers depending on the operation the user types.

Coding Practice ·

Python Coding Exercise #15: Order of Magnitude

A beginner Python exercise on separate if statements — print every "smaller than" message that applies to a number, and see why using elif here would give the wrong output.