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
how to store an url in a dartabase(sql server 2005)? (or) create table b(url what is the datatype for url?


Pascal program: Exactly what you need to do to generate your empirical data is specific to your individual assignment. However, some rules apply to all of you: 1. The gener

how to save bulk entries at a time using collections?

Write a shell script  (W.A.S.S) to calculate gross salary. Program # Write a shell script  (W.A.S.S) to calculate gross salary. echo "Enter any Basic Salary"     #echo is

Lexical Analyzer: Symbol Table - Holds the symbols accepted by the lexical analyzer or parser.  Each symbol may be a terminal or a non-terminal.  Terminal symbols are listed

A number of simple student records are written to a text file. The format of some typical linesshould be - Task (1): Using a text editor, create a file with 10 such reco

This is the programming language of the Web. It is mainly used for validating forms. JavaScript & Java can be associated to each other. There exist several other differences betwee

On December 27, 2011, Seymour Gravel, at the urging of his wife, Mary Walford, has brought you his preliminary figures for his business. Seymour carries on a business writing and e

Write a program to handle a book collection. The data on each book might be title, author, publication date, book number and  cataloging details. Allow for adding or deleting books