CSCI-UA.0002 - Summer 2017 - Nathan Hull

Assignment #1 - Due: Monday, July 10


Write a program that has two main parts:

Part 1.) The first half of this program uses three integer variables, the width, height, and area of a room. First, read in the two integer variables, width and height. They should be multiplied by each other and stored in the third variable, the area. Then display all three variables and their values 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:

LastNameFirstName_assign1.py (for example, BondJames_assign1.py)

Submit the program via your home.nyu.edu account on "NYU Classes". Put both halves of the program, and the comments for the 'crashes' into a single file.