Hafeezul Kareem has Published 345 Articles

Unit Testing using Unittest in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 24-Apr-2020 12:12:21

508 Views

In this tutorial, we are going to learn about Unit Testing using the unittest built-in module. Testing plays a major role in software development. You will know the issues before going to the production itself.We'll learn the basics of testing in Python using the built-in module called unittest. Let's jump ... Read More

Writing files in the background in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 13:01:33

396 Views

In this tutorial, we will learn about the multi-threading in Python. It helps us to perform multiple tasks at a time. Python has a module called threading for multitasking.We see how it works by writing data to a file in the background while calculating the sum of elements in a ... Read More

Testing in Python using doctest module

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:58:40

2K+ Views

We know docstring gives extra information about the function and classes in Python. We can also use it for testing of the functions using the doctest module. The doctest modules execute the code which starts with >>> and compares it against the expected output.Follow the below steps to write a ... Read More

Sum 2D array in Python using map() function

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:54:03

4K+ Views

In this tutorial, we are going to find the sum of a 2D array using map function in Python.The map function takes two arguments i.e., function and iterable. It passes every element of the iterable to the function and stores the result in map object. We can covert the map ... Read More

Simple GUI calculator using Tkinter in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:51:27

3K+ Views

In this tutorial, we are going to create a simple GUI calculator using the TkinterĀ module. TkinterĀ is builtin the Python module for developing the GUI application. It's easy to use and comes with Python. We can visualize our data with GUI applications.Let's see how to create a simple GUI calculator.Import everything ... Read More

Run Length Encoding in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:40:49

1K+ Views

In this tutorial, we are going to learn how to create a run-length encoding in Python. Given a string return a new string containing char and frequency.For example, the string tutorialspoint will be encoded as t3u1o2r1i2a1l1s1p1n1. The order is every char+frequency. Join all of them and return. See the steps ... Read More

Python program to check if a string contains any unique character

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:32:36

3K+ Views

In this tutorial, we are going to write a program that checks whether a string contains any special character or not. It's straightforward in Python.We will have a set of special characters in the string module. We can use that one to check whether a string contains any special characters ... Read More

Python program to accept the strings which contains all vowels

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:28:45

1K+ Views

Sometimes you want to accept input based on certain conditions. Here, we are going to see the same type of program. We will write a program that allows only words with vowels. We will show them whether the input is valid or not.Let's see the approach step by step.Define a ... Read More

Print a Calendar in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 12:21:27

10K+ Views

In this tutorial, we are going to learn how to print the calendar of month and year using the calendar module of Python. It's a straightforward thing in Python. We need year and month numbers. That's it.Let's see how to print a year calendar. Follow the below steps to print ... Read More

Multiplication of two Matrices using Numpy in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 11:49:31

688 Views

In this tutorial, we are going to learn how to multiply two matrices using the NumPy library in Python. It's straightforward with the NumPy library.It has a method called dot for the matric multiplication. You can install the NumPy library with the following command.pip install numpyLet's see the steps involved ... Read More

Advertisements