CSCI-UA.0002 - Summer 2013 - Nathan Hull

Assignment #1 - Due: Monday, July, 15

Write a program that has two main parts:

Part 1.) The first half of this program uses three integer variables. First, two of the variables should be multiplied by each other and stored in the third variable. Then display all three variables and their values on the screen. Finally, display an example of a division problem (one variable divided by another) and display the results on the screen.

Next, list out at least five ways to “crash” the program and document your errors. Please include at least one syntax, one logic, and one run-time error. Please include these errors as comments in the program so that the program will still run!

Part 2.) Do you remember Mad Libs?

The second part of this program should prompt the user for a minimum of eight inputs (six text inputs with at least two numbers) and then print out your "mad lib" result! Here is a sample partial run:

Sample input:

Enter an adjective: purple
Enter another adjective: ancient
Enter a noun: dragon
Enter another noun: spoon

Sample output:

Here is your mad lib!!
The purple bear went into the ancient house.
There she saw a dragon and a spoon.

3.) The program should be named as follows: (for example,

Submit the program via your account on "NYU Classes". Put both halves of the program, and the comments for the 'crashes' into a single file in order to submit it since Blackboard will only allow you to submit one file per homework.