homework1

homework1 - COMP 140: Computational Thinking Homework 1:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COMP 140: Computational Thinking Homework 1: The devil and Daniel Webster Assigned: 8/31/09, Due: 10PM, 9/7/09 Be sure to carefully read the course policies for assignments on the course web site: http://www.clear.rice.edu/comp140/ The basic code for running the webster problem is provided on the course web site as webster.py . You may use and modify this code any way you like. Your assignment should be turned in via Owlspace. You should turn in two files: netid-hw1.py and netid- hw1.txt. netid should be replaced with your netid ( i.e. , rixner-hw1.py and rixner-hw1.txt). All Python code you write should be contained within the .py file. Add comments into the file (lines starting with a #) to indicate which problem is being solved. All text that you write should be contained within the .txt file, clearly marking which problem you are writing about. Both files should also have your name an netid on the first line (in a comment in the .py file). Problem 1 In this assignment, we will explore two variations of the devil and Daniel Webster problem. Part A: Suppose Webster wants out of the deal on the day before his salary is less than zero. Compute when Webster should quit working for the devil, so he can make the following counteroffer: I will take your starting salary of $1000, give you a starting commission of $100, and follow your other rules, but I will quite on the t-th day.-th day....
View Full Document

This note was uploaded on 09/26/2010 for the course COMP 140 taught by Professor Devika during the Fall '10 term at Rice.

Page1 / 2

homework1 - COMP 140: Computational Thinking Homework 1:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online