From N V Fitton, ideas to share with my students at Northern Virginia Community College, Alexandria campus.
I teach mathematics and computer science.

Friday, January 27, 2006

130 homework for week 4

Submitting homework:
   130 in subject line
   paste code in body — works better than attachment!
   include a sample command to tell me how to run your program

Assignment 0
   finish last week's two programs

Assignment 1
   a program that can count up or down
   sample runs:

   count 20 5 up
   5
   10
   15
   20
   count 20 5 down
   20
   15
   10
   5

   or you could do it like this:

   count 20 5
   5
   10
   15
   20
   count 20 -5
   20
   15
   10
   5

As with all computer programs, there are many different ways to write it; you only have to decide on one.

Assignment 2
   reverse a word
   recommend try TYPE instead of PRINT
   sample run:

   reverse abcde
   edcba


Bonus
   show all the vowels in a string

   vowels qwerouifjnwejkmmo
   eouieo

1 Comments:

Anonymous Anonymous said...

This is a little comment!

1:00 PM

 

Post a Comment

<< Home