Bill Manaris : Fall 2008 / CSCI 210 Homework 3

Assigned Date: Thursday, Oct. 16, 2008
Due Date: Tuesday, Oct. 28
Due Time: 1:40pm

Last modified on October 21, 2008, at 04:09 PM (see updates)


To get acquainted with variables, data types, arithmetic expressions, and I/O operations in Python.


Write a program that produces a personalized adventure about a band of explorers that find a stash of gold pieces. The player should be asked for the number of explorers, the number of explorers lost in battle, the name of the quest leader, and how many gold pieces were found. The program should then use the information to fill out a basic adventure story.

For a sample run, see our textbook (p. 52). Remember to add the number of the found gold pieces as another input.

Note how the program calculates the remaining coins, based on the input provided by the user.

(The above is based on exercise 5 in ch. 2 of our textbook.)


All identifiers should be meaningful.

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:

# <ProgramName>.py
# Name: <your name goes here first and last minimum>
# Class: <your class goes here>
# Date: <today's date goes here>
# 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)>

<your Python code goes here>


To submit your homework:

  1. Email me a copy of your source code. The subject must read "CSCI 210: Homework 3".
  2. Also, at the beginning of class on the due date, bring a paper printout of your code along with a printout of a sample run, using the following inputs: 7, 3, Smith, 452.


Your assignment will be graded based on its documentation (comments, meaningful identifiers), correctness, subject line of your email, and, in general, how well you followed the above instructions.

(Printable View of