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

Product of an array

Write a NumPy program to calculate the product of an array. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Is an array empty?

Write a NumPy program to check whether an array is empty. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Frequency of unique values

Write a NumPy program to count how often each unique value appears. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Magnitude of a vector

Write a NumPy program to get the magnitude (length) of a vector. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Drop rows with NaN

Write a NumPy program to remove rows that contain NaN. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Replace negative values

Write a NumPy program to replace negative values with 1. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Add a column

Write a NumPy program to add an extra column to an array. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Float array to integers

Write a NumPy program to convert an array of floats to integers. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Access by column

Write a NumPy program to print each column of an array. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Square every element

Write a NumPy program to print the squares of all elements. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Print every element

Write a NumPy program to print every element of a 2-D array. Step-by-step explanation, colour-coded code and real output.

1 min readRead →
Python practice

Make an array read-only

Write a NumPy program to make an array immutable. 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.