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

Latest articles

1,677 articles · page 75 of 140
Python practice

Function with *args

Write a Python function that accepts any number of numbers with `*args` and prints their cubes. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

HCF function

Write a Python function to find the HCF of two numbers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Sum from 0 to n

Write a Python function to calculate the sum of numbers from 0 to 10. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

LCM function

Write a Python function to find the LCM of two numbers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Function inside a function

Write a Python program that defines and uses a function inside another function. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Run Python code stored in a string

Write a Python function that executes Python code stored in a string. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Squares of 1 to 10

Write a Python function that creates and prints a list of the squares of 1 to 10. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Even numbers from a list

Write a Python function that returns the even numbers of a list. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Prime check function

Write a Python function that returns True if a number is prime. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique elements in order

Write a Python function that returns a new list with the unique elements of a list, in order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Is a number in a range?

Write a Python function to check whether a number is within a range (inclusive). Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Reverse a string

Write a Python function to reverse a string. 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.