## List Comprehensions

Let's learn about list comprehensions! You are given three integers x,y and z representing the dimensions of a cuboid along with an integer i. Print a list of all possible coordinates given by (i,j,k)

View Solution →## Find Runne-Up Score

Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given n scores. Store them in a list and find the score of the runner-up. I

View Solution →## Nested Lists

Given the names and grades for each student in a class of N students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Note: If there are multiple

View Solution →## Finding the Percentage

The provided code stub will read in a dictionary containing key/value pairs of name:[marks] for a list of students. Print the average of the marks array for the student name provided, showing 2 places

View Solution →## Lists

Consider a list (list = []). You can perform the following commands: 1. insert i e: Insert integer e at position i. 2. print: Print the list. 3. remove e: Delete the first occurren

View Solution →## Tuples

Task: Given an integer, n, and n space-separated integers as input, create a tuple, t, of those n integers. Then compute and print the result of hash(t). Note: hash() is one of the function

View Solution →## sWAP cASE

You are given a string and your task is to swap cases. In other words, convert all lowercase letters to uppercase letters and vice versa. For Example: Www.HackerRankSolution.in → wWW.hA

View Solution →