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 73 of 95 · Clear filters
Python practice

Validate a password

Write a Python program to check a password: at least one lowercase letter, one uppercase letter, one digit, one of $ # @, and 5 to 15 characters...

3 min readRead →
Python practice

Fibonacci numbers up to 55

Write a Python program to print the first 11 Fibonacci numbers (0 to 55). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Number triangle 1, 22, 333

Write a Python program to print row i with the number i repeated i times, for i from 1 to 5, using nested...

1 min readRead →
Python practice

Inverted right triangle of stars

Write a Python program to print an inverted right triangle of stars with 5 rows. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Right triangle of stars

Write a Python program to print a right triangle of stars with 5 rows. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Numbers from 0 to 100 divisible by 5

Write a Python program to find the numbers from 0 to 100 divisible by 5. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sum of odd numbers 1 to 100

Write a Python program to calculate the sum of all odd numbers from 1 to 100. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Electricity bill with slabs

Write a Python program to calculate an electricity bill: first 50 units Rs 0.50, next 100 units Rs 0.75, next 100 units Rs 1.25, above 250 units Rs…

1 min readRead →
Python practice

Taxi bill by distance

Write a Python program to calculate a bill: first 5 km at Rs 15/km, next 20 km at Rs 12/km, after that Rs...

1 min readRead →
Python practice

Characters of a string into a list

Write a Python program that adds every character of an input string to an empty list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Star pyramid

Write a Python program to print a pyramid of stars with 5 rows (1, 3, 5, 7, 9 stars). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Letter A pattern

Write a Python program to print the letter 'A' with stars. 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.