Write a program to create map function, Programming Languages

Assignment Help:

Given a list of numbers, say

my @input_numbers = (1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144);

write a program map1.pl that will use the function map

(a) to produce a list of numbers where each number is 100 greater than the number in the original list

(b) an hash where the numbers from the original list are the keys and their squares are the values

(c) a list containing the digits of the numbers ending in 4

comp315@turing> map1.pl

101 101 103 105 108 113 121 134 155 189 244

21 => 441

3 => 9

8 => 64

1 => 1

34 => 1156

144 => 20736

89 => 7921

13 => 169

5 => 25

55 => 3025

3 4 1 4 4


Related Discussions:- Write a program to create map function

Write and test a simple perl program on the linux platform, Write and test ...

Write and test a simple perl program on the linux platform.  You may use any linux system you wish, including the Suse linux installed in the lab. Activities. Note:  to r

Complementary slackness and duality, Consider the following LP problem: ...

Consider the following LP problem: min x 1 +3 x2 +x 3 -x 4 s.t. x 1 +x 2 +x 3 +x 4 ≥ 0 x 1 +x 2 -x 3 -x 4 ≥ 1 x 2 , x 3 ≥ 0 x 1 , x 4 ≤ 0. 1. Unique pr

C++ language introduces, C++ language introduces object-oriented programmin...

C++ language introduces object-oriented programming (OOP) features to C language. It offers classes, which provide the four features commonly present in OOP (or some non-OOP) langu

Prolog predicate to remove nth element, Write a Prolog predicate remove_nth...

Write a Prolog predicate remove_nth(N,L1,L2) that is true if list L2 is just list L1 with its Nth element removed. If L1 does not have an Nth element then the predicate should fail

HTML Form/JavaScript, I have a problem which seems to be quite a rare one a...

I have a problem which seems to be quite a rare one and I can safely say I know what exactly what is causing it. After some process of elimination I reached the conclusion that, in

Database, How to create an ER diagram?

How to create an ER diagram?

Board coloring problem description, Board Coloring Problem Description ...

Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.

Linux commans, Corrected Exercise #1: 1. Explain the following unexpected r...

Corrected Exercise #1: 1. Explain the following unexpected result: why did you get the system date command instead of the script? $ whereis date date: /bin/date ... $ echo $PATH

Triple eigenvalue with one eigenvector, Triple Eigenvalue with 1 Eigenvecto...

Triple Eigenvalue with 1 Eigenvector The eigenvalue/vector pair in this case are l and  ?h , . Since the eigenvalue is real we know as the first solution we require is, e l

Asp.net, How to lunch webcame via viusal studio 2012

How to lunch webcame via viusal studio 2012

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd