Wood_SimpleGame
.docx
keyboard_arrow_up
School
Lone Star College System, Woodlands *
*We aren’t endorsed by this school
Course
1315
Subject
Computer Science
Date
Feb 20, 2024
Type
docx
Pages
6
Uploaded by MateBat2484
Submission Document Template:
Part 1: Enter the following general information to be included
Student Name: Daniel Wood
Class Number: ITSE 1302
Assignment Name: Simple Game
Program Type: Minor
Insert Assignment Requirements Below Here Copied from Assignment Document: (Worth 5 Points)
Program: Simple Game Program
Worth 25 points
Description: You want to create a game for 2 people that uses a single dice roll to move you around the 20 space board.
However, as the player goes from start to finish, occasionally they will be given a "chance" opportunity: player is asked to guess whether or not the roll is even or odd. If player is correct, they move forward the original spaces rolled. If they fail, they move back the number of spaces rolled. The first player to reach the end, wins.
Requirements:
Standard Requirements:
o
Includes comments for each section of code specifying input, process, and output for each:
o
Initialize all variables prior to usage
o
Use constants instead of literals: MAX_SPACES = 20, etc.
o
Code separated into IPO sections, and appropriate comments.
o
NOTE
: Do not use any Python programming techniques that we have not yet covered in class. This includes special operators/functions, lists, arrays, and tuples: basically cool shortcuts that replace techniques we have been using in class, (Not because the cool shortcut is not useful and time-saving, but because I need to see that you understand the underlying concepts.)
Use functions to:
o
ask for players names
o
Roll dice to determine spaces; if dice value is evenly divisible by 3, player should perform "chance" task
o
Perform even/odd task: player guesses even or odd; dice is rolled. If result matches guess, return a value that indicates player should move forward the original number of spaces rolled. Otherwise, return value indicating player should move the original number of spaces rolled backward.
o
Print result of each play for each each player. (See sample output)
Sample Input/Output:
Enter name of player 1: Joe
Enter name of player 2: Sue
Round 1:
Joe rolls the dice and gets 4
Joe moves 4 spaces forward and is now on space 4
Sue rolls the dice and gets 5
Sue moves 5 spaces forward and is now on space 5
Round 2:
Joe rolls the dice and gets 2
Joe moves 2 spaces forward and is now on space 6
Sue rolls the dice and gets 3
Chance Opportunity: Guess whether the next roll of the dice will be odd or even:
even
The dice roll is 5 which is odd
Sue goes back 3 spaces and is now on space 2
Round 3:
Joe rolls the dice and gets 5
Joe moves 2 spaces forward and is now on space 11
Sue rolls the dice and gets 4
Sue moves 4 spaces and is now on space 6
Round 4:
Joe rolls the dice and gets 6
Chance Opportunity: Guess whether the next roll of the dice will be odd or even:
odd
The dice roll is 1 which is odd
Joe moves 6 spaces forward and is now on space 17
Sue rolls the dice and gets 4
Sue moves 4 spaces and is now on space 10
Round 5:
Joe rolls the dice and gets 4
Joe moves 4 spaces forward and is now on space 21
Sue rolls the dice and gets 5
Sue moves 5 spaces and is now on space 15
End of Game!
Joe wins on space 21
Sue is on space 15
Part 2: Analysis and Design (Worth 10 points) An IPO chart containing significant steps and formulas used to create program OR pseudo code containing significant steps and formulas used to create program. It should not be your actual source code copied into the chart … it should be your plan for the source code not written in python.
Insert IPO or pseudo code below Here: (Worth 10 Points)
Main()
Step 0: Initialization
Step 1: Input
Step 2: Process
Step 3: Output
userName1 = str
userName1
While user1Square or user2Square >= 20
Turn results
userName2 = str
userName2
take a turn (user1) sets new user1Square
user1Square = int(0)
take a turn (user2) sets new user2Square
user2Square = int(0)
Declare winner
Winner results
LAST_SQUARE = int(20)
Turn(userName, currentSquare)
Step 0: Initialization
Step 1: Input
Step 2: Process
Step 3: Output
diceRoll
input (userName roll the dice!)
Return resultSquare to main
currentSquare
parameter
diceRoll (random function)
resultSquare
Check for extra process (function)
userName
parameter
resultSquare = currentSquare + diceRoll
ExtraProcess(diceRoll)
Step 0: Initialization
Step 1: Input
Step 2: Process
Step 3: Output
diceRoll (parameter)
diceRoll (parameter)
Ask user to guess even or odd
newDiceRoll
newDiceRoll
Use random to roll dice
Return new dice variable
If user is correct, newDiceRoll = diceRoll
Print what happened
Else
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Q: It is always challenging to decide when to stop testing. Testing exit criteria can be decided either formally or informally.You are required to write a minimum of 2500 words on testing exit criteria.Note: Attach plagiarism report with it and the percentage of plagiarism must be less than 15%.
arrow_forward
Layout
References
Mailings
Review
View
Developer
Help
KOD RENT_CH
Write the business rules that are reflected in the ERD shown in Figure P2.15. (Note that the ERD
reflects some simplifying assumptions. For example, each book is written by only one author.
Also, remember that the ERD is always read from the "1" to the "M" side, regardless of the
orientation of the ERD components.)
FIGURE P2.15 The Crow's Foot ERD for Problem 19
PUBLISHER
BOOK
publishes
sub mits
writes
CONTRACT
AUTHOR
signs
十
A business rule is an explanation that forces some type of requirement on a particular part of the information
base, like the components inside a field detail for a specific field or the attributes of a given relationship.
tes)
EO
* Accessibility: Investigate
DE
26
bp
arrow_forward
in a shop ,there are 10 employee and 20 kinds of goods,goods id between 1-20
EMPLOYEE id first name last name gender
10001, 'Tom', 'Brown', 'F'10002, 'Elizabeth', 'Tremblay', 'F'10003, 'Gladys', 'Julie', 'F10004, 'John', 'Taylor', 'M10005, 'Amelia', 'Smith'10006, 'Logan', 'Katherine'10007, 'Leo', 'Brown'10007, 'Lem', 'Thompson'10009, 'Tom' 'Smith'10010, 'Emma', 'Campbell'
------------
and I want to add a name library in it ,like this
how could i create a HTML file ,with will randomly create customers with these employee .
there is a start button on the page .
press "start "bottom ,and it will It will randomly match 10 items, customers, and goods, display goods id ,customername and gender ,employer name , id and gender .
how to do such a page ?
arrow_forward
Task Class Requirements
The task object shall have a required unique task ID String that cannot be longer than 10 characters. The task ID shall not be null and shall not be updatable.
The task object shall have a required name String field that cannot be longer than 20 characters. The name field shall not be null.
The task object shall have a required description String field that cannot be longer than 50 characters. The description field shall not be null.
Verify with Juint testing as well
arrow_forward
Q1 Draw uml class diagram
The SUV Rental Provider App has two types of system users namely Client and Admin. The client, who can be Member or Non-Member can search for SUV models and daily rental. Each SUV model consists of SUV model details and daily rental. Thus, the Client can choose to view the SUV model details such as description and images and daily rental based on the types of the selected model. Only Member and Admin are required to log in to access the system. Member gains access to additional services. The additional services for members are: manage a reservation, check membership details, change password, manage credit card and banking information, and log out. Each Member is entitled to reserve up to 10 SUVs. When a member makes a reservation, he/she has to specify the selected SUV model and the number of rental days. The member also can edit and delete a reservation. Based on the reservation, the app generates the rental quotation. The rental quotation includes both the…
arrow_forward
bmi calculation, coding and flow chart
arrow_forward
tlon Completion Status:
Moving to another question will save this response.
Question 4
is used to refine the system desighr
Physical design
Logical design
Model
o Conceptual design
arrow_forward
Overloading Operators as Non-members Instructions Grading When you have completed your program, click the Submit button to record your score.
arrow_forward
Question Completion Status:
Moving to another question will save this response.
Question 3
is a leader of the steering team.
Team leader
Project sponsor
User
Project manager
A Moving to another question will save this response.
arrow_forward
Project must include the following elements (using phyton software):
1. Multi-selection structure
2. Nested selection structure
3. User-defined function
4. User-defined function to perform a numerical calculation
5. All user-defined functions must be in individual files (phyton only)
6. Built-in function to perform the numerical calculation
7. Array manipulation
8. File operation
9. Apply data visualization library
I need to create programming for my project's ohms law calculation following all these elements. Here im attach image of my previous programming for ohms law calculation. Thank you for helping!
arrow_forward
Folder Structure
Your project will contain two sub-directories:
library
test
In the library directory, create the classes in the class diagram below. In the test directory, create the test applications.
Class Diagram
CollegeApplicant Class
Write a class encapsulating the concept of College Applicant. Use the class diagram above as well as the specific requirements below to develop your class:
Class Members
name - The name of the college applicant.
college - The name of the college.
CollegeApplicant() - Initializes an instance of the CollegeApplicant class where the name and college are set to "unknown".
CollegeApplicant(String, String - Initializes an instance of the CollegeApplicant class where the name and college are set to the specified values.
getName() : String - Returns the college applicant's name.
setName(String) : void - Sets the college applicant's name.
getCollege() : String - Returns the name of the college.
setCollege(String) : void - Sets the name of the college.…
arrow_forward
Create a formula that provides the start date of a project as follows:
In cell H4, begin to enter a formula using the INDEX
Use the Lookup table (range A2:E23) as the array.
For the row_num argument, use the MATCH
Use the Project ID (cell H2) as the lookup_value for the MATCH function.
Use the ID column (range A2:A23) as the lookup_array for the MATCH function.
Specify an exact match (0) for the MATCH function.
Use the Start Date column (column 4) as the column_num for the INDEX function.
arrow_forward
Code Listing to shows the template for the build process.
arrow_forward
Week 4 IPO
Assignment Content
There are 4question Create IPO chart
q1. When Trina began her trip from New York to Florida, she filled her car's tank with
gas and
reset its trip meter to zero. After traveling 324 miles, Trina stopped at a gas station to refuel; the
gas tank required 17 gallons.
arrow_forward
8
File
Help
Tell me what you want to do
Home Insert Design Layout References Mailings Review View
iGET GENUINE OFFICE Your license isn't genuine, and you may be a victim of software counterfeiting. Avoid interruption and keep your files safe with genuine Office today.
Page 1 of 1
80 words
Accessibility: Investigate
CS309
CS309 ASSIGNMENT 9 - Word
A process description for "Pay Commission" is provided below:
For each COMMISSION EARNED
If EXTRA BONUS equals Y
|
-If PAYMENT TOTAL is greater than $80,000
Add 3% to COMMISSION PERCENT
Output SPECIAL LETTER
Output AWARD LIST
Else Add 2% to COMMISSION PERCENT
Output AWARD LIST
Else
If PAYMENT TOTAL is greater than $80,000
Add 1% to COMMISSION PERCENT
Output SPECIAL LETTER
Calculate COMMISSION COMMISSION PERCENT times PAYMENT TOTAL
Required:
Construct a Decision Table for the above process description.
delinki asylum
Get genuine Office
Learn more
F
+
+
X Q
X
100%
arrow_forward
A 'SubWay' sub order has many items that may be included on the order. The order may contain choices such as breads, meats, toppings, condiments. Each order has an ID, name, and order date. Breads have a 'best used by date' and type such as white, rye, wheat, etc. Meats have a 'expiration date' and type such as turkey, ham, roast beef. Toppings and condiments have their own characteristics as well. Draw entities and represent any mutually exclusive relationships. Include optionality, cardinality, relationship names, attributes, UIDs and entities.
arrow_forward
Hospital Management System
Create a structure containing patient information like patient id, name of patient ,disease description,doctor name and flag to know whether patient has an appointment
you have to
1 Add a new patient
2 Display patients that have an appointment
3 Display all the patients in the hospital of a particular doctor
4 Display all the patients that have appointment with a specific doctor
5 Display the total number of patients in the hospital
6 Book a appointment
note (if we book an appointment ,the total number of appointments is increased by 1 )
arrow_forward
An Art Museum needs to keep track of its artwork and exhibitions. The museum has a collection of
artwork. Each piece of art has a unique id [ArtID], an artist, year and title.
Artwork is categorized by type. There are two types, paintings and sculptures. Paintings have a
paintType and style. Sculptures have a material, height and weight.
Artwork is frequently shown in exhibitions. Each exhibition has a unique name, startDate, endDate.
A listing of the artwork displayed at an exhibition is also retained.
Below is an E-R diagram for a database to help the Art Museum. Provide appropriate names for
entities E1, E2, E3, E4 identifiers 11, 12, 13, 14 missing attributes and relationship cardinality RC1
and relationship type RT1.
Start_date
End_date
E1
E1
11
RC1
PaintType
Style
E3
13
A1
Title
Year
A/
A
A/
A/
A/
A/
A/
A/
A
A/
A/
E2
12
A/ E2
E3
E4
11
12
13
14
A1
A2
RC1
RT1
RT1
A2
Height
Weight
E4
14
Activate
Go to Settin
arrow_forward
Using Tableau create a variable for following situation
student classification
Graduate
undergraduate
HONOR (based on classification)
for graduate
GPA>90 then "GOLD"
for undergraduate
GPA>80 then "gold ribbon"
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Related Questions
- Q: It is always challenging to decide when to stop testing. Testing exit criteria can be decided either formally or informally.You are required to write a minimum of 2500 words on testing exit criteria.Note: Attach plagiarism report with it and the percentage of plagiarism must be less than 15%.arrow_forwardLayout References Mailings Review View Developer Help KOD RENT_CH Write the business rules that are reflected in the ERD shown in Figure P2.15. (Note that the ERD reflects some simplifying assumptions. For example, each book is written by only one author. Also, remember that the ERD is always read from the "1" to the "M" side, regardless of the orientation of the ERD components.) FIGURE P2.15 The Crow's Foot ERD for Problem 19 PUBLISHER BOOK publishes sub mits writes CONTRACT AUTHOR signs 十 A business rule is an explanation that forces some type of requirement on a particular part of the information base, like the components inside a field detail for a specific field or the attributes of a given relationship. tes) EO * Accessibility: Investigate DE 26 bparrow_forwardin a shop ,there are 10 employee and 20 kinds of goods,goods id between 1-20 EMPLOYEE id first name last name gender 10001, 'Tom', 'Brown', 'F'10002, 'Elizabeth', 'Tremblay', 'F'10003, 'Gladys', 'Julie', 'F10004, 'John', 'Taylor', 'M10005, 'Amelia', 'Smith'10006, 'Logan', 'Katherine'10007, 'Leo', 'Brown'10007, 'Lem', 'Thompson'10009, 'Tom' 'Smith'10010, 'Emma', 'Campbell' ------------ and I want to add a name library in it ,like this how could i create a HTML file ,with will randomly create customers with these employee . there is a start button on the page . press "start "bottom ,and it will It will randomly match 10 items, customers, and goods, display goods id ,customername and gender ,employer name , id and gender . how to do such a page ?arrow_forward
- Task Class Requirements The task object shall have a required unique task ID String that cannot be longer than 10 characters. The task ID shall not be null and shall not be updatable. The task object shall have a required name String field that cannot be longer than 20 characters. The name field shall not be null. The task object shall have a required description String field that cannot be longer than 50 characters. The description field shall not be null. Verify with Juint testing as wellarrow_forwardQ1 Draw uml class diagram The SUV Rental Provider App has two types of system users namely Client and Admin. The client, who can be Member or Non-Member can search for SUV models and daily rental. Each SUV model consists of SUV model details and daily rental. Thus, the Client can choose to view the SUV model details such as description and images and daily rental based on the types of the selected model. Only Member and Admin are required to log in to access the system. Member gains access to additional services. The additional services for members are: manage a reservation, check membership details, change password, manage credit card and banking information, and log out. Each Member is entitled to reserve up to 10 SUVs. When a member makes a reservation, he/she has to specify the selected SUV model and the number of rental days. The member also can edit and delete a reservation. Based on the reservation, the app generates the rental quotation. The rental quotation includes both the…arrow_forwardbmi calculation, coding and flow chartarrow_forward
- tlon Completion Status: Moving to another question will save this response. Question 4 is used to refine the system desighr Physical design Logical design Model o Conceptual designarrow_forwardOverloading Operators as Non-members Instructions Grading When you have completed your program, click the Submit button to record your score.arrow_forwardQuestion Completion Status: Moving to another question will save this response. Question 3 is a leader of the steering team. Team leader Project sponsor User Project manager A Moving to another question will save this response.arrow_forward
- Project must include the following elements (using phyton software): 1. Multi-selection structure 2. Nested selection structure 3. User-defined function 4. User-defined function to perform a numerical calculation 5. All user-defined functions must be in individual files (phyton only) 6. Built-in function to perform the numerical calculation 7. Array manipulation 8. File operation 9. Apply data visualization library I need to create programming for my project's ohms law calculation following all these elements. Here im attach image of my previous programming for ohms law calculation. Thank you for helping!arrow_forwardFolder Structure Your project will contain two sub-directories: library test In the library directory, create the classes in the class diagram below. In the test directory, create the test applications. Class Diagram CollegeApplicant Class Write a class encapsulating the concept of College Applicant. Use the class diagram above as well as the specific requirements below to develop your class: Class Members name - The name of the college applicant. college - The name of the college. CollegeApplicant() - Initializes an instance of the CollegeApplicant class where the name and college are set to "unknown". CollegeApplicant(String, String - Initializes an instance of the CollegeApplicant class where the name and college are set to the specified values. getName() : String - Returns the college applicant's name. setName(String) : void - Sets the college applicant's name. getCollege() : String - Returns the name of the college. setCollege(String) : void - Sets the name of the college.…arrow_forwardCreate a formula that provides the start date of a project as follows: In cell H4, begin to enter a formula using the INDEX Use the Lookup table (range A2:E23) as the array. For the row_num argument, use the MATCH Use the Project ID (cell H2) as the lookup_value for the MATCH function. Use the ID column (range A2:A23) as the lookup_array for the MATCH function. Specify an exact match (0) for the MATCH function. Use the Start Date column (column 4) as the column_num for the INDEX function.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L