Write a program to create map function, Programming Languages

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

Posted Date: 3/12/2013 1:37:41 AM | Location : United States







Related Discussions:- Write a program to create map function, Assignment Help, Ask Question on Write a program to create map function, Get Answer, Expert's Help, Write a program to create map function Discussions

Write discussion on Write a program to create map function
Your posts are moderated
Related Questions
Object-oriented languages Languages that support OOP features can be classified into the following two categories: 1.    Object-based programming languages, and 2.      O

I have to create a calorie counter and I am totally lost

2. TEST & AND TEST is like CMP, it is used for conditional statement, and doesn’t save the answer. AND is logical multiplication. 3. INS & IN IN is used for data transfer from I/O

I need an efficient and fast reverse engineer with good knowledge of assembly x86 language, strong reverse engineering skills, IDA Pro (Hex-Rays) to Linux game routine, C, C++ prog

Characteristics of procedure-oriented programming: Emphasis is on doing things (algorithms). Large programs are divided into smaller programs known as functions.

wat is- m=5; n=3; x=m++-n+++m;

1.) Write a flowchart and program to do the following: A pressure sensor in a cooling system measures the pressure of the refrigerant and is connected to Port -1 of the 8051. If th

How does a Case Structure differ from a Case structure program in pseudocode

For this programming assignment, you are to develop a Fortran 90/95/2003 program to automate a useful task. The aim of the assignment is for you to reveal your competence in the Fo

Pre-order integration on Shopify store We are looking for on-call developers who can integrate Celery on client Shopify stores. Requirements a) Contented editing Shopify them