COMP1405A/1005A− “Introduction to Computer Science I” Assignment 2

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (6 votes)

“The Oregon Trail” was a (somewhat) educational computer game about life as a pioneer on
the journey westward across the United States. The game required you to manage a wagon
full of supplies while guiding a party of five settlers from Independence Missouri to
Willamette Valley in Oregon. For this assignment, you will practice with the pipeline design
pattern by writing a Python 3 computer program that parallels the initial choices made by a
player a similar game of your own design.
Although you will not be copying “The Oregon Trail” directly, I strongly recommend you try
the game at least once before starting this part of the assignment. The 1990 release can be
played for free online at:
https://archive.org/details/msdos_Oregon_Trail_The_1990
COMP1405A/1005A (Fall 2019) − “Introduction to Computer Science I”
Specification for Assignment 2 of 6
Please note that you must not attempt to reproduce the initial decisions from “The Oregon
Trail” exactly; you are expected to come up with an original idea for the decisions for a
similar game (wherein a player would make decisions while guiding a team to a destination).
Start first by displaying a list of possible “professions” (or “character classes”, or “races”, etc.)
where the list items are either numbered (i.e., 1, 2, and 3) or designated by letters (i.e., a, b,
and c) or Roman numerals (i.e., i, ii, and iii). Once you have displayed the list, ask the player
to make a selection. It is not necessary for you to confirm that the player has made a valid
selection, but you must store the player’s choice in a variable.
Next, you must ask the user for the names of at least three members of the team. Store each
name in a separate variable.
Finally, you must present the user with a list of five different types of supplies along with the
cost per unit. You must then ask the user how many units of each supply should be purchased
and keep a running total of how much the user has spent. After the player answers each
question you must print out the “bill so far” and once the player has been asked about each
of the five types of supply, your program must print out a summary of what was purchased.
You do not need to use pygame to complete this assignment, but you must not use any other
libraries. On the following page, you will find an example of how such a program might
appear to the user. Remember that you may not replicate “The Oregon Trail” exactly, as you
are expected to use this as inspiration and create something similar (meeting the
requirements detailed above).
Please also note that one of your mandatory reading assignments included instructions on
how to format data that is being printed to the screen, so your program output is expected
to be properly formatted. Costs, for example, must have a precision of 2 decimal places.
This program (along with any other program submitted in this class) must be a completely
original work, authored by you and you alone, prepared for this offering (i.e., Winter 2018)
of COMP1005/COMP1405. Do not discuss this assignment with anyone except the instructor
or the teaching assistants, and do not copy images or source code samples from the internet
or any other source.
COMP1405A/1005A (Fall 2019) − “Introduction to Computer Science I”
Specification for Assignment 2 of 6
Transcript Example (with user input in red)
========================
The Oregon Trail
========================
Many kinds of people made the trip to Oregon. You may:
1. Be a banker from Boston
2. Be a carpenter from Ohio
3. Be a farmer from Illinois
What is your choice? 1
What are the first names of the four other members in your party?
1. Zeke
2. Jed
3. Mary
5. Henry
5. Anna
Before leaving Independence you should buy equipment and supplies.
Oxen cost $40.00 a yoke. How many yoke do you want? 3
Bill so far: $120.00
Food costs $0.20 a pound. How many pounds do you want? 1000
Bill so far: $320.00
Clothing costs $10.00 a set. How many sets do you want? 10
Bill so far: $420.00
Bullets cost $2.00 a box. How many boxes do you want? 99
Bill so far: $618.00
Spare parts cost $10.00 each. How many spare parts do you want? 3
Bill so far: $648.00
========================
Matt’s General Store
========================
1. Oxen $120.00
2. Food $200.00
3. Clothing $100.00
4. Ammunition $198.00
5. Spare parts $30.00
========================
Total bill: $648.00