SQA Tools Blog

Learn testing and automation, one article at a time

Free tutorials, solved practice problems and interview prep for QA and automation engineers: Python, Playwright, Selenium, SQL, Git and more.

1,677Articles
1,141Solved Python problems
7Topics
100%Free

Python practice articles

1,137 articles · page 63 of 95 · Clear filters
Python practice

Reverse a number

Write a Python program to reverse the digits of a number. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Factorial of a number

Write a Python program to find the factorial of a number. n! = 1 × 2 × ... × n, and 0! = 1. Step-by-step explanation, colour-coded code…

1 min readRead →
Python practice

Days between two dates

Write a Python program to calculate the number of days between two dates. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print the current date in a format

Write a Python program to print the current date in the format "2023 Jan 05" (year, short month name, day) using the datetime...

1 min readRead →
Python practice

Simple interest

Write a Python program to calculate simple interest. Simple interest = P × R × T / 100, where P is the principal, R the yearly rate in…

1 min readRead →
Python practice

Check an Armstrong number

Write a Python program to check whether a number is an Armstrong number: the sum of its digits, each raised to the power of the number of digits,…

2 min readRead →
Python practice

Surface area of a cylinder

Write a Python program to calculate the surface area of a cylinder. Area = 2πrh + 2πr². Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Surface area of a cube

Write a Python program to calculate the surface area of a cube. Surface area = 6 × a². Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Area of a circle

Write a Python program to calculate the area of a circle. Area = π × r². Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Area of a square

Write a Python program to calculate the area of a square. Area = side × side. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Formula (a + b)³ = a³ + 3ab(a + b) + b³

Write a Python program to solve the formula (a + b)³ = a³ + 3ab(a + b) + b³. Step-by-step explanation, colour-coded code and real output.

1 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.