Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.

Similar presentations


Presentation on theme: "Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and."— Presentation transcript:

1 Prof. Alfred J Bird, Ph.D., NBCT abird@cs.umb.edu http://it441-s14-bird.wikispaces.umb.edu/ Office – McCormick 3rd floor 607 Office Hours – Tuesday and Thursday 4:00PM to 5:15PM

2 1. A program to print out a list of the squares and cubes of the numbers from 1 to 20. 2. A program to ask for a number and test if it is a prime number. 3. A program to ask for two numbers and print out the sum of the numbers until it is told to stop. 4. A program to chose a specific action based upon an alpha input.

3 5. Calculate the first 50 prime numbers and write them to an output file. 6. Calculate the first 40 members of the Fibonacci Series and write them to an output file. 7. Read the two output files and print them to the screen.

4  Remember what the redirectors do:  >  >>  <

5 open (IN1, “<input.txt”) or die $!; open (OUT1, “>>output.txt”) or die $!; while( ){ chomp($inputData = ); print OUT1 “Hello $inputData!\n”; } close (IN1); close (OUT1);

6 8. Write a program to count the number of words in the file oneWordGettysburg.txt located on the wiki. 9. Write a program to count the number of times the word the occurs in the file oneWordGettysburg.txt located on the wiki.

7  Submit the code for the nine programming problems listed today.  Each one on a separate sheet of paper.  Remember to put the appropriate comments in each program.  These challenges are due on Monday and will be assessed for a grade.  You may work with other students but you must submit your own work. Plagiarism will be sanctioned.


Download ppt "Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and."

Similar presentations


Ads by Google