Finding Mean, Median, Mode in Python without libraries

In this article, we will learn how to calculate Mean, Median and Mode with Python without any using external libraries. Mean : The mean is the average of all numbers and is sometimes called the arithmetic mean. This code calculates Mean or Average of a list containing numbers: n_num = [1, 2, 3, 4, 5] … Read more

Python Bigram formation from given list

In this post we will discuss about bigram formation from a given list in python programming language. We will discuss two methods for creating bigrams. When we are dealing with text classification, sometimes we need to do certain kind of natural language processing and hence sometimes require to form bigrams of words for processing. In … Read more

Convert a list of multiple integers into single integer Python

Given a list of integers, write a Python program to convert a list of multiple integers into single integer. Input : [1, 2, 3] Output: 123 Input : [55, 32, 890] Output: 5532890 There are multiple approaches possible to convert the given list into a single integer. Let’s see each one by one. Approach #1 … Read more

Convert case of elements in a list of strings Python

Given a list of strings, write a Python program to convert case of all string from lowercase/uppercase to uppercase/lowercase. Input : [‘PrO’, ‘pROG’, ‘RAMmInG’] Output: [‘pro’, ‘prog’, ‘ramming’] Input : [‘fun’, ‘Foo’, ‘BaR’] Output: [‘FUN’, ‘FOO’, ‘BAR’] Method #1 : Convert Uppercase to Lowercase using map function out = map(lambda x:x.lower(), [ ‘PrO’, ‘pROG’, ‘RAMmInG’]) … Read more

Method resolution order in Python Inheritance

Method Resolution Order : Method Resolution Order(MRO) it denotes the way a programming language resolves a method or attribute. Python supports classes inheriting from other classes. The class being inherited is called the Parent or Superclass, while the class that inherits is called the Child or Subclass. In python, method resolution order defines the order … Read more

Cohesity internship interview

Here you will find details about the Cohesity internship interview experience, questions with their possible solutions are discussed here: Round 1: The first round was an online round held on Hackerearth. It had 2 questions of easy-medium level. Easliy solvable with decent coding skills. Round 2: This was a Zoom online interview round lasting for … Read more