Honors 270 Assignment 4

Due October 6


Please turn in this assignment (and all future assignments for this course) by emailing them to me . Please use the subject of "Honors 270 HW4" (note that the spacing matters) for this assignment (if you use the link above, the subject will be added automatically). Please attach separately the source code to all the programs that you write for this assignment. Each program should be attached as separate file to make it easier for me to read them. When answering the questions themselves feel free to answer directly in the body of your message or attach your answers as a separate file. You may want to copy and paste the questions into your message.

Number properties

Write a program that will ask the user to input a number, and then it will test several properties about the number, and put the results in a list. Each test should be in a separate function. The tests are:
  1. The square root of the number - negative numbers should have the square root as square root of the absolute value * i. Eg sqrt of -9 should be stored in your list as "3i".
  2. The number cubed.
  3. Whether the number is odd or even.

After filling the list, the program should print the list to the screen.

Run your program with the following input: 1, 10, -16, -55, 12541.

Attach your code and your program's output to the email that you send for this assignment.