Hafeezul Kareem has Published 328 Articles

Get a google map image of specified location using Google Static Maps API in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 11:29:57

4K+ Views

Google provides a static maps API that returns a map image on our HTTP request. We can directly request for a map image with different parameters based on our need.We have to create a billing account on Google to use this API. You can go to the website for more ... Read More

Find current weather of any city using OpenWeatherMap API in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 11:25:39

9K+ Views

In this tutorial, we are going to get the weather of a city using OpenWeatherMap API. To use the OpenWeatherMap API, we have to get the API key. We will get it by creating an account on their website.Create an account and get your API Key. It's free until 60 calls ... Read More

Count frequencies of all elements in array in Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 11:16:43

20K+ Views

In this tutorial, we are going to write a program that finds the frequency of all the elements in an array. We can find it in different ways let's explore two of them.Using dictInitialize the array.Initialize an empty dict.Iterate over the list.If the element is not in dict, then set ... Read More

Count all prefixes in given string with greatest frequency using Python

Hafeezul Kareem

Hafeezul Kareem

Updated on 12-Feb-2020 11:10:44

622 Views

In this tutorial, we are going to write a program that counts and prints the words with a higher frequency of an alphabet than the second one.Take a string and two alphabets. The prefixes with a higher frequency of the first alphabet will be printed. And display the count at ... Read More

Calculate n + nn + nnn + u + n(m times) in Python Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 02-Jan-2020 07:07:04

391 Views

In this tutorial, we are going to write code to find the sum of the series n + nn + nnn + ... + n (m times). We can do it very easily in Python. Let's see some examples.Input: n = 1 m = 5 Series: 1 + 11 + ... Read More

Boolean Indexing in Pandas

Hafeezul Kareem

Hafeezul Kareem

Updated on 02-Jan-2020 06:58:52

2K+ Views

Boolean indexing helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a boolean index to use the boolean indexing. Let's see how to achieve the boolean indexing.Create a dictionary of data.Convert it into a DataFrame object with a boolean index as ... Read More

Calendar Functions in Python - ( calendar(), month(), isleap()?)

Hafeezul Kareem

Hafeezul Kareem

Updated on 02-Jan-2020 06:53:15

590 Views

We can perform the calendar operations using the calendar module in Python. Here, we are going to learn about the different methods of calendar class instance.calendar.calendar(year)The calendar class instance returns the calendar of the year. Let's see one example.Example Live Demo# importing the calendar module import calendar # initializing year year ... Read More

Calendar Functions in Python -(monthrange(), prcal(), weekday()?)

Hafeezul Kareem

Hafeezul Kareem

Updated on 02-Jan-2020 06:47:01

583 Views

We are going to explore different methods of calendar module in this tutorial. Let's see one by one.calendar.monthrange(year, month)The method calendar.monthrange(year, month) returns starting weekday number and number of days of the given month. It returns two values in a tuple. Let's see one example.Example Live Demo# importing the calendar module ... Read More

casefold() string in Python Program

Hafeezul Kareem

Hafeezul Kareem

Updated on 02-Jan-2020 06:31:14

166 Views

In this tutorial, we are going to discuss the string method str.casefold(). It doesn't take any arguments. The return value of the method is a string that is suitable for the caseless comparisons.What are caseless comparisons? For example, the german lower case letter ß is equivalent to ss. The str.casefold() method ... Read More

append() and extend() in Python program

Hafeezul Kareem

Hafeezul Kareem

Updated on 01-Nov-2019 09:53:04

517 Views

In this tutorial, we are going to learn about the most common methods of a list i.e.., append() and extend(). Let's see them one by one.append()append() method is used to insert an element at the end of a list. The time complexity of append() method is O(1).Syntaxlist.append(element) -> element can ... Read More

Advertisements