Skip to content

Latest commit

 

History

History

map-and-lambda-expression

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Map and Lambda Function

https://www.hackerrank.com/challenges/map-and-lambda-expression

Problem

Let's learn some new Python concepts! You have to generate a list of the first N fibonacci numbers, 0 being the first number. Then, apply the map function and a lambda expression to cube each fibonacci number and print the list.

Input Format

One line of input: an integer N.

Output Format

A list on a single line containing the cubes of the first N fibonacci numbers.

Sample Input 0

5

Sample Output 0

[0, 1, 1, 8, 27]

My Solution