This recap exercise was produced by Professor Kitlei Robert
-
Make a "Hello world" program.
-
Working with command line arguments...
- print how many of them there are.
- print them in order line by line
- print them in order line by line, with sequence numbers
- print them in reverse order
- print their lengths
- supposing that they are all numbers...
- print their sum
- print only the even numbers
- print them in numerical order
- print them in alphabetical order
- print only those of which there are multiple copies
-
After that...
- Make a Fibonacci function, using the recursive definition.
- Make another version that uses iteration.
- Make another version that returns all the numbers up to the given value in an array.
-
Print all divisors of the number given in the first command line argument.
-
a. Find the function that takes the square root of numbers. b. If you have learned about Newton's method, make your own version using it.
-
The command line arguments contains an expression in reverse Polish notation, which consists of the four basic operations and integers. Calculate the value of the expression.
Example: 1 2 3 * +
Result: 7 = (3 * 2) + 1