## Exceptions in python – Hackerank Solution

Exceptions in python – Hackerank Solution Exceptions Errors detected during execution are called exceptions. Examples: ZeroDivisionErrorThis error is raised when the second argument of a division or modulo operation is zero. …

## Maximize It! Python Hackerrank Solution

Maximize It! Python Hackerrank Solution You are given a function f(X)=X^2 You are also given K lists. The ith list consists of Ni elements. You have to pick one element from each list so that the value …

## Power – Mod Power Hackerank Solution

Power – Mod Power Hackerank Solution So far, we have only heard of Python’s powers. Now, we will witness them! Powers or exponents in Python can be calculated using the …

## Mod Divmod Python Hackerank Solution

Mod Divmod Python Hackerank Solution One of the built-in functions of Python is divmod, which takes two arguments a and b and returns a tuple containing the quotient of a/b first and then the remainder a. For example: …

## Set .intersection() Operation – hackerank solution

Set .intersection() Operation hackerank solution .intersection() The .intersection() operator returns the intersection of a set and the set of elements in an iterable.Sometimes, the & operator is used in place of the .intersection() operator, but it …

## Iterables and Iterators – Hackerrank Solution Python

Iterables and Iterators Hackerrank solution python The itertools module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an iterator algebra making it …

## Triangle Quest 2 Hackerrank Solution Python

Triangle Quest 2 Hackerrank Solution Python You are given a positive integer N.Your task is to print a palindromic triangle of size N . For example, a palindromic triangle of size % is: 1 …

## Piling Up! – Python Hackerrank Solution

Piling Up! – Python Hackerrank Solution There is a horizontal row of n cubes. The length of each cube is given. You need to create a new vertical pile of cubes. The …

## Set .union() Operation – Python HackerRank Solution

Set .union() Operation – Python HackerRank Solution .union() The .union() operator returns the union of a set and the set of elements in an iterable.Sometimes, the | operator is used in place of .union() operator, but …

## Compress the String! – Python hackerrank Solution

Compress the String! – Python hackerrank Solution In this task, we would like for you to appreciate the usefulness of the groupby() function of itertools . To read more about this function, Check this out . …