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

Append to a file

Write a Python program to append data to an existing file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Overwrite a file

Write a Python program to overwrite the content of an existing file. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Read a file in read mode

Write a Python program to read a file in reading mode. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

All permutations of a string

Write a Python function that returns all permutations of a string, without itertools. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Integer to words

Write a Python function that converts an integer from 0 to 999 into English words. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Validate a mobile number

Write a Python function to check whether a mobile number is valid: 10 digits starting with 6, 7, 8 or 9 (optionally with...

1 min readRead →
Python practice

Length of the last word

Write a Python function that returns the length of the last word in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Search for words in a string

Write a Python function that reports which of the given words appear in a string. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add two binary numbers

Write a Python function to add two binary numbers given as strings. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Library management system

Write a Python program with functions to add, issue, return and list books in a library. Step-by-step explanation, colour-coded code and real output.

2 min readRead →
Python practice

Reverse an integer

Write a Python function to reverse an integer, keeping the sign. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Leap year function

Write a Python function to check whether a year is a leap year. 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.