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 74 of 140
Python practice

Fruit shop management system

Write a Python program with functions to add stock, sell fruit and show the inventory of a fruit...

2 min readRead →
Python practice

Return the sum

Write a Python function that returns the sum of two numbers, and show the difference between print and...

1 min readRead →
Python practice

Login function

Write a Python function that accepts a username and password and reports whether login succeeded. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Odd numbers from 1 to 100

Write a Python function that returns the odd numbers from 1 to 100. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Primes from 1 to 100

Write a Python function that returns the prime numbers from 1 to 100. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Dictionary keyed by first and last letters

Write a Python function that maps the first and last letter of each word to the word. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Square every dictionary value

Write a Python function that returns a new dictionary with every value squared. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Duplicate characters

Write a Python function that returns the characters that appear more than once. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Unique values with dict.fromkeys

Write a Python function to get the unique values of a list in order. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Does any pair sum to 10?

Write a Python function that checks whether any two numbers in a list add up to 10. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Fibonacci terms up to n terms

Write a Python function that returns the first n Fibonacci numbers starting 1, 1. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Factorial function (recursive)

Write a Python function to get the factorial of a number. 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.