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
Write a booking and pricing system for seats for performances in a theatre. Design and write a system to handle information (equipment, people, events etc.) for a club. Given

Design an object definition named Pet, which should have the following fields: name: The name field holds the name of a Pet type: The type field holds the type of anima

For the following Code answer the following questions-: .STACK 100H .DATA COUNT DB 10 TOTAL DW 4126H .CODE MAIN PROC MOV BX, 3F20H MOV AL, BL MOV BL, COUNT MOV

develop a pseudocode algorithm to determine the total amount of extra cost changed to the organizers for expenses accurednduring the workshop. the code is to be written for an unde

1. use a small perl program and matching config file to retrieve and reformat the system time for a number of remote machines via snmp.  Readings should have a local timestamp for

write c++ source code to find the number of digits in a given integer? pls ans

Explain the Break Statement - Computer Programming? The break statement is used as an interrupt to the normal flow of control this statement causes as exit from the switch stat

Define Reasons for using Functions? 1. Evade rewriting the same code over and over. 2. It is simpler to write programs and keep track of what they are doing. Codes are able t

As an XML expert you are required to model a system for an online bookshop. After an interview with the shop manager you have the following information: The detail of th

You get a contract to implement a simple Java application that process NBA team roster : your application has to read the NBA team roster from a text file and then print each playe