Fall2007.CSCI220Homework1 History

Hide minor edits - Show changes to output

Changed line 2 from:
'''Due Dates''': Friday, Sep. 14, 2007\\
to:
'''Due Dates''': Monday, Sep. 17, 2007\\
Changed lines 28-29 from:
Email your @@piApproximator.py@@ file as an attachment.
to:
Email your @@piApproximator.py@@ file '''as an attachment'''.
Changed lines 30-31 from:
Email subject should be "'''Assignment #1'''").
to:
Email subject should be "'''Assignment #1'''".
Changed lines 28-31 from:
Email your @@piApproximator.py@@ file (email subject should be "'''Assignment #1'''") to [[(mailto:)manaris@cs.cofc.edu]].

(If you do the bonus, submit both programs in the same email.)
to:
Email your @@piApproximator.py@@ file as an attachment.

Email subject should be
"'''Assignment #1'''").

My email address is
[[(mailto:)manaris@cs.cofc.edu]].

(If you do the bonus, submit both programs in the same email, as attachments.)
Changed lines 22-23 from:
Use ideas from [[(Attach:)chaosTurtle.py]] to visualize how close your approximation is. (''Hint:'' Draw two lines, one with length equal to ''π''*100, and the other with a length that slowly increases as the approximation is getting better.
to:
Use ideas from [[(Attach:)chaosTurtle.py]] to visualize how close your approximation is. (''Hint:'' Draw two lines, one with length equal to ''π''*100, and the other with length that slowly increases as the approximation is getting better.
Changed lines 14-15 from:
Do Exercise 15 on p. 74 of the text to approximate the value of pi.
to:
Write program @@piApproximator.py@@ that approximates the value of ''π'' by summing the terms of this series: 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 + ... The program should prompt the user for ''n'', the number of terms to sum, and then output the sum of the first ''n'' terms of this series.

Have your program subtract the approximation from the value of @@math.pi@@ to see how accurate it is.

[-(This is exercise 15 on p. 74 of the text.)-]

!!Bonus

Use ideas from [[(Attach:)chaosTurtle.py]] to visualize how close your approximation is. (''Hint:'' Draw two lines, one with length equal to ''π''*100, and the other with a length that slowly increases as the approximation is getting better.

Do this in a separate program, @@visualPiApproximator.py@@
.
Changed lines 28-29 from:
Email your @@piApproximator.py@@ file (email subject should be "Assignment #1") to [[(mailto:)manaris@cs.cofc.edu]].
to:
Email your @@piApproximator.py@@ file (email subject should be "'''Assignment #1'''") to [[(mailto:)manaris@cs.cofc.edu]].

(If you do the bonus, submit both programs in the same email.)
Changed lines 18-19 from:
Email your @@.py@@ file, with subject line "Assignment #1", to [[(mailto:)manaris@cs.cofc.edu]] by the due date.
to:
Email your @@piApproximator.py@@ file (email subject should be "Assignment #1") to [[(mailto:)manaris@cs.cofc.edu]].
Added lines 1-56:
'''Assigned Date''': Friday, Sep. 7, 2007\\
'''Due Dates''': Friday, Sep. 14, 2007\\
'''Due Time''': 11:55pm

Last modified on {$LastModified} (see [[http://www.cs.cofc.edu/~manaris/index.php/Fall2007/CSCI220Homework1?action=diff&source=n&minor=n | updates]])

!!Learning Objectives

* Create a Python program on your own.
* Develop a simple Python program that does arithmetic.

!!Assignment

Do Exercise 15 on p. 74 of the text to approximate the value of pi.

!!Submission

Email your @@.py@@ file, with subject line "Assignment #1", to [[(mailto:)manaris@cs.cofc.edu]] by the due date.

!!Policies

The following policies are in effect for this assignment:

* Programming assignment grades will be based on design and style as well as correctness of result.

* You may discuss the problem and how to solve it with others, but you may not look at, copy, or use any code (or pseudocode) that was written by anyone other than yourself. If I have evidence that you have shared program code or used code found anywhere, your grade will be zero.

* If you do discuss the problem and how to solve it with others, you must document that in the program code.

* Not following these rules is in violation of the Student Honor Code and instances of such violations will be reported to the Honor Board.

!!Documentation

All identifiers should be meaningful.

Include your design (pseudocode) as comments in your program.

The following comments should appear in your program as the first lines in the file. Items in angle brackets are either to be removed or replaced with what is specified within the brackets:

(:source lang=Python tabwidth=3 -trim :)
##
## Name: <your name goes here first and last minimum>
## <ProgramName>.py
##
## Problem: <Brief, one or two sentence description of the
## problem that this program solves, in your own
## words.>
##
## Certification of Authenticity:
## <include one of the following>
## I certify that this lab is entirely my own work.
## I certify that this lab is my own work, but I
## discussed it with: <Name(s)>
##
(:sourcend:)