Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 632 Bytes

File metadata and controls

33 lines (20 loc) · 632 Bytes

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