SlideShare ist ein Scribd-Unternehmen logo
1 von 2
Downloaden Sie, um offline zu lesen
Linux IV – Perl Programming
Take Home – Prelim Laboratory Examination

      Directly print your code to short bond paper using notepad or DOS type command. Do not, copy
       paste it to other application. This will have an effect to the code.
      Staple the bond paper with this questionnaire, being the first page, before submitting it.
      Write your printed name at the upper left side of every bond paper you’ve used and affix your
       signature on top of the printed name.
      Put it in a short brown envelope and write your full name, year and section, and subject in front of
       the envelope.
      Submit your exam papers personally on or before 12:00 nn. of January 03 2011, Monday. Time
       will be based on the wall clock located at the stairway in ITCC.

Non-compliance with the above instructions would invalidate your exam and thus will require you
to take the special exam


Name: ___________________________________                        Year and Section: ______________

   1. Write a program that reads lines of input containing numbers, each of which is separated by a
      space, and prints out the following:
      a. The total/sum of numbers for each line
      b. The grand total/sum of all number

       Signal the end of input using Ctrl-D.



   2. Write a program that reads a list of numbers (on separate lines) until end-of-input and then
      prints for each number the corresponding person's name from the list shown below.

           1. joell

           2. michelle

           3. lorie

           4. eds

           5. grace

           6. cory

           7. reinier

           8. tina

           9. rochelle

           10. ruth
(Hardcode this list of names into your program)

Example:

if the input numbers were 1, 4, 3, 4, and 4,

the output names would be joell, eds, lorie, eds, and eds.

Weitere ähnliche Inhalte

Ähnlich wie Linux IV - PERL

This assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docxThis assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docxdunningblair
 
Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Ramadan Babers, PhD
 
Statistics 141 homework 6 complete solutions correct answers key
Statistics 141 homework 6 complete solutions correct answers keyStatistics 141 homework 6 complete solutions correct answers key
Statistics 141 homework 6 complete solutions correct answers keySong Love
 
Looping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxLooping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxadihartanto7
 
Case Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxCase Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxtroutmanboris
 
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxABDULAHAD507571
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy BookAbir Hossain
 
Hello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfHello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfactioncbe1
 
C language for Semester Exams for Engineers
C language for Semester Exams for Engineers C language for Semester Exams for Engineers
C language for Semester Exams for Engineers Appili Vamsi Krishna
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statisticsDorothy Bishop
 
Computer Practical
Computer PracticalComputer Practical
Computer PracticalPLKFM
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokePranoti Doke
 
Computing an average mark for four tests Design the algorithm and the.docx
Computing an average mark for four tests  Design the algorithm and the.docxComputing an average mark for four tests  Design the algorithm and the.docx
Computing an average mark for four tests Design the algorithm and the.docxljohn878
 
Lesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptxLesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptxDysRobles
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncMargenePurnell14
 

Ähnlich wie Linux IV - PERL (20)

This assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docxThis assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docx
 
Introduction to computer_lec_04
Introduction to computer_lec_04Introduction to computer_lec_04
Introduction to computer_lec_04
 
Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018Introduction to computer_lec_04_fall_2018
Introduction to computer_lec_04_fall_2018
 
C notes
C notesC notes
C notes
 
Statistics 141 homework 6 complete solutions correct answers key
Statistics 141 homework 6 complete solutions correct answers keyStatistics 141 homework 6 complete solutions correct answers key
Statistics 141 homework 6 complete solutions correct answers key
 
Looping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxLooping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptx
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
 
Case Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docxCase Summary Assignment Planning and organization fundamentally .docx
Case Summary Assignment Planning and organization fundamentally .docx
 
C++ lecture 01
C++   lecture 01C++   lecture 01
C++ lecture 01
 
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docxLab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
Lab 4 ,5 & 6 Submission (3) 14136_Mohsin Alvi.docx
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
Hello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdfHello guys please make sure program runs well USING C anyth.pdf
Hello guys please make sure program runs well USING C anyth.pdf
 
C language for Semester Exams for Engineers
C language for Semester Exams for Engineers C language for Semester Exams for Engineers
C language for Semester Exams for Engineers
 
Learning R while exploring statistics
Learning R while exploring statisticsLearning R while exploring statistics
Learning R while exploring statistics
 
Computer Practical
Computer PracticalComputer Practical
Computer Practical
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
 
Computing an average mark for four tests Design the algorithm and the.docx
Computing an average mark for four tests  Design the algorithm and the.docxComputing an average mark for four tests  Design the algorithm and the.docx
Computing an average mark for four tests Design the algorithm and the.docx
 
Lesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptxLesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptx
 
C programme presentation
C programme presentationC programme presentation
C programme presentation
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
 

Mehr von Binsent Ribera

Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Binsent Ribera
 
COMELEC III - Bash unit 1 part 2
COMELEC III - Bash unit 1 part 2COMELEC III - Bash unit 1 part 2
COMELEC III - Bash unit 1 part 2Binsent Ribera
 
COMELEC III - Bash unit 1
COMELEC III - Bash unit 1COMELEC III - Bash unit 1
COMELEC III - Bash unit 1Binsent Ribera
 
Ibm system programming training module 2 - linux basics
Ibm system programming training   module 2 - linux basicsIbm system programming training   module 2 - linux basics
Ibm system programming training module 2 - linux basicsBinsent Ribera
 
PERL Unit 6 regular expression
PERL Unit 6 regular expressionPERL Unit 6 regular expression
PERL Unit 6 regular expressionBinsent Ribera
 
PERL Regular Expression
PERL Regular ExpressionPERL Regular Expression
PERL Regular ExpressionBinsent Ribera
 

Mehr von Binsent Ribera (8)

Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Spl prelim lab 2011 2012
Spl prelim lab 2011 2012Spl prelim lab 2011 2012
Spl prelim lab 2011 2012
 
COMELEC III - Bash unit 1 part 2
COMELEC III - Bash unit 1 part 2COMELEC III - Bash unit 1 part 2
COMELEC III - Bash unit 1 part 2
 
COMELEC III - Bash unit 1
COMELEC III - Bash unit 1COMELEC III - Bash unit 1
COMELEC III - Bash unit 1
 
Ibm system programming training module 2 - linux basics
Ibm system programming training   module 2 - linux basicsIbm system programming training   module 2 - linux basics
Ibm system programming training module 2 - linux basics
 
PERL Unit 6 regular expression
PERL Unit 6 regular expressionPERL Unit 6 regular expression
PERL Unit 6 regular expression
 
PERL Regular Expression
PERL Regular ExpressionPERL Regular Expression
PERL Regular Expression
 

Linux IV - PERL

  • 1. Linux IV – Perl Programming Take Home – Prelim Laboratory Examination  Directly print your code to short bond paper using notepad or DOS type command. Do not, copy paste it to other application. This will have an effect to the code.  Staple the bond paper with this questionnaire, being the first page, before submitting it.  Write your printed name at the upper left side of every bond paper you’ve used and affix your signature on top of the printed name.  Put it in a short brown envelope and write your full name, year and section, and subject in front of the envelope.  Submit your exam papers personally on or before 12:00 nn. of January 03 2011, Monday. Time will be based on the wall clock located at the stairway in ITCC. Non-compliance with the above instructions would invalidate your exam and thus will require you to take the special exam Name: ___________________________________ Year and Section: ______________ 1. Write a program that reads lines of input containing numbers, each of which is separated by a space, and prints out the following: a. The total/sum of numbers for each line b. The grand total/sum of all number Signal the end of input using Ctrl-D. 2. Write a program that reads a list of numbers (on separate lines) until end-of-input and then prints for each number the corresponding person's name from the list shown below. 1. joell 2. michelle 3. lorie 4. eds 5. grace 6. cory 7. reinier 8. tina 9. rochelle 10. ruth
  • 2. (Hardcode this list of names into your program) Example: if the input numbers were 1, 4, 3, 4, and 4, the output names would be joell, eds, lorie, eds, and eds.