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

Sum of the first and last digits

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

1 min readRead →
Python practice

First and last digits

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

1 min readRead →
Python practice

Count the digits of a number

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

1 min readRead →
Python practice

Sum of odd numbers 1 to n

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

1 min readRead →
Python practice

Sum of even numbers 1 to n

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

1 min readRead →
Python practice

Sum of 1 to n

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

1 min readRead →
Python practice

Odd numbers from 1 to 100

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

1 min readRead →
Python practice

Even numbers from 1 to 100

Write a Python program to print all even numbers from 1 to 100. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print A to Z with chr()

Write a Python program to print the alphabet from A to Z using a for loop and `chr()` (chr(65) is...

2 min readRead →
Python practice

Natural numbers n to 1 with while

Write a Python program to print the natural numbers from n down to 1 using a while loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Natural numbers 1 to n with while

Write a Python program to print the natural numbers from 1 to n using a while loop. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Letter O pattern

Write a Python program to print the letter 'O' with stars. Step-by-step explanation, colour-coded code and real output.

2 min readRead →

Preparing for a QA interview?

Take free timed mock tests with answers and explanations.