Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Flowchart for hangman game

27/04/2021 Client: muhammad11 Deadline: 2 Day

coding: utf-8 -*""" Project: Final Group Project Names: Danayet, Filmon, Furqan, Ken, Nebel Date: """ import random def playRound(userMove, compMove, userDmg, compDmg): # print damage done by move print("You did",userMove,"points of damage to your opponent!") print("Your opponent did",compMove,"points of damage to you!") userDmg+=compMove compDmg+=userMove # print damage print("Total Damage to You: ",userDmg) print("Total Damage to Opponent: ",compDmg) return (userDmg,compDmg) player1 = [5,2,4,3] player2 = [4,2,3,5] play = "y" while play.lower() in ("y","yes"): # creates empty array for user and computer players # will be assigned to player1 and player2 values user = [] computer = [] # sets user and computer damage to 0 for the new game userDmg = 0 compDmg = 0 # STORYBOARDS NEEDED # CHOOSE PLAYER while user==[] and computer==[]: # input to choose player playerChoice = input("Pick a player by entering 1 or 2:") # validate input is 1 or 2 if playerChoice.isdigit(): if int(playerChoice)==1: # if they chose player 1: user = player1 computer = player2 elif int(playerChoice)==2: # if they chose player 2 user = player2 computer = player1 # break; else: print("Error: invalid input") else: print("Error: invalid input") """ PLAY A ROUND Collect the user's choice of move Validate their choice Generate random move for computer Play a round and return total damage """ for t in range(4): # validate input is 1, 2, 3, or 4 moveChoice = -1 while moveChoice not in [1,2,3,4]: moveChoice = input("Select move 1, 2, 3, or 4:") # digit is 1, 2, 3, or 4 if moveChoice.isdigit(): if int(moveChoice) in [1,2,3,4]: moveChoice=int(moveChoice) # translate user move choice into index (starts at 0, not 1) else: print("Error: invalid input") else: print("Error: invalid input") compMove = computer[random.randrange(0,4)] userMove = user[moveChoice-1] # play a round and return total damage done so far userDmg, compDmg = playRound(userMove, compMove, userDmg, compDmg) # WHO WON? if compDmg > userDmg: # user won by doing more damage print("You did {0} points of damage while your opponent did {1} points, so you won this round!".format(userDmg,compDmg)) elif userDmg < compDmg: # computer won by doing more damage print("You did {0} points of damage while your opponent did {1} points, so you lost this round.".format(userDmg,compDmg)) else: print("This round is tied.") # PLAY AGAIN? # Ask user if they want to play another round play = input("Would you like to play again? Enter 'y' for yes or 'n' for no:") # validate input until user types Y/y/N/n while play.lower() not in ("yes","y","no","n"): print("Error: invalid input.") play = input("Would you like to play again? Enter y for yes or n for no:") print("Thanks for playing!") Choose Your Own Adventure Purpose In this assignment you will practice with everything you have learned so far in class to create a custom interactive text based game. This project provides you with the opportunity to practice everything you have learned in this course including: • Mastery of the core components of the programming language • Designing a program with flowcharts and pseudocode • Working within a team to develop a program • Reading and debugging programs written by other coders Background Some of the very first computerized role-playing games were text based adventures such as Zork, Oregon Trail, or Legend of the Red Dragon. Often these games involved exploring a location, encountering a foe or trial, and dying in a spectacularly hilarious way. Other text based games are based on existing pencil and paper games such as Hangman or Mastermind. Task You are going to design a game that your classmates will be able to play in class. You may choose to create your own role playing game, or program a simple version of an existing game. No matter which game you choose to program, there are certain things common to all games that you must include: • A set of instructions to direct the player on the rules • A clear goal so the player knows what they are trying to achieve • A means of keeping score to know how well the player performed • Whether they win or lose, a prompt to ask the user if they want to play again, and make sure their response is an acceptable answer (“yes”/“no”, “y”/“n”). Make sure to check the validity for all of your user inputs throughout the program. Don’t let bad input create errors. Notes and Hints: You should start with this program, as with all programs, by breaking the program down into parts. 1. Make a plan: Begin by mapping out the flow of execution in your program. Break it down into different parts and decide what can be broken out into functions (printing instructions, reading the leaderboard file, printing out the leaderboard, validating input, etc.). Your flowchart and pseudocode are part of your deliverables, so take your time to design something that you know you can code. 2. Reuse where possible: Some of the features and functions that you will need for this project have already been written in your previous assignments such as input validation or printing instructions. Find any logic or code that you have already written and turn it into a reusable function within your program. 3. Test your code often. Make sure you have run through every possible scenario that you mapped out in your flowchart. Make sure to test for the “monkey-at-the-keyboard” scenario to validate all user input. 4. Figure out how you will collect the player’s names and keep score for your leaderboard. For Hangman, number of letters correctly guessed; for Mastermind, fewest moves to solution; or for a role playing game, number of foes vanquished. The leaderboard should maintain a list of the top ten players and their scores. It should be printed out at the end of any gaming session after the user has indicated that they don’t want to play anymore. As new users play, more names can be added to the leaderboard.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Engineering Guru
Quick Finance Master
Assignments Hut
Quality Assignments
A Grade Exams
Top Writing Guru
Writer Writer Name Offer Chat
Engineering Guru

ONLINE

Engineering Guru

I have read and understood all your initial requirements, and I am very professional in this task.

$15 Chat With Writer
Quick Finance Master

ONLINE

Quick Finance Master

Give me a chance, i will do this with my best efforts

$28 Chat With Writer
Assignments Hut

ONLINE

Assignments Hut

Give me a chance, i will do this with my best efforts

$23 Chat With Writer
Quality Assignments

ONLINE

Quality Assignments

I have read and understood all your initial requirements, and I am very professional in this task.

$32 Chat With Writer
A Grade Exams

ONLINE

A Grade Exams

Hello, I an ranked top 10 freelancers in academic and contents writing. I can write and updated your personal statement with great quality and free of plagiarism

$22 Chat With Writer
Top Writing Guru

ONLINE

Top Writing Guru

I have read and understood all your initial requirements, and I am very professional in this task.

$32 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

East grinstead hockey club - Advantages of core cutter method - Macquarie group capital notes 5 - Assigm 5 IPT - Which mission statement best represents the chester company - Hp scanjet pro 4500 fn1 network scanner software download - Soap note nurse practitioner - Joule thomson coefficient ideal gas - Physics study design vce - 344 coatesville riverhead highway - Dr david thomas oncologist st george - Brunoli inc v town of bradford - How to find basis of row space and column space - Wilsons prom lighthouse accommodation - Information Governance week 5-2 - Due today by 10pm - Homework writing - FN week 6 - Vce products & services - Cash was paid by janer's cleaning service - I am sam character description - Tcs domino server name - The tendency to revert to a fixed (or modal) action pattern is called instinctive drift. - Ncku chinese language center - Yale university investments office august 2006 - As tall as a giraffe simile - Beth and bob martin have total take home pay - Criticism of kotter's 8 step model - Chemical bonds are made and broken by - Byrne v van tienhoven - Need presentation based on uploaded document - Physical Geography Lab - Discussion - Strayer outline - I need two slides on HR plan Developing as an effective professional in the real food company - HOMEWORK 3 "ALL QUESTION MUST BE ANSWERED IN DETAIL" - Is my assignment help legit - Castlemilk high school address - Determine the machine’s second-year depreciation using the double-declining-balance method. - The Multinational Enterprise In Global Production And Trade Networks - Individual Essay - What did mckinley's reelection show about american attitudes toward imperialism - ENG 225 Introduction to Film NO PLAGIARISM PLZ - Text - What are the reactants of the calvin cycle - Public administration week 8 - Harley purchases components from three suppliers - Tia hw - ACCOUNTING PAPER - Acca p1 examiner name - 66 kv gis switchgear - Threshold and distinctive capabilities - CMST 303 Week 6 discussion - Fabio old spice commercials - Class One: Part One - Yeast fermentation lab balloon answers - Lean unit 2 answers - 220 902 scenario questions - Nmat review center 2019 - Hhps and whmis symbols quiz - Formulating leadership part ii powerpoint - How do you return books to chegg - Restricted electrical worker's licence - Rolls royce marine perth - Acrostics using the word life - Discussion 10 - Quality control analytics at toyota excel - Article Summ 4 - 5 axioms of communication gamble and gamble - Groundwater sustainability and human development - How to install sunlite polycarbonate roofing - How to ask for feedback from your manager - Cnn the eighties netflix - Taylormade r540 xd driver illegal - Adelaide university degree finder - Data flow diagram for hotel management system - Discussion(NCM) - The Role of Privacy in the Workplace - Bells of st clements lyrics - Jonathan livingston seagull questions answers - The practice of statistics 3rd edition chapter 5 answers - Subordination of individual interest to general interest in kfc - Four square writing template - 2103 summerland heights ln santa barbara ca 93108 - Ansoff matrix advantages and disadvantages - Venturi mask colours mnemonic - Difference between microprocessor and microcontroller and microcomputer - 2/23 st huberts road carnegie - Essay "River in flood" - Religion paper (Islam) - Sedgemoor market forthcoming sales - Research Paper topic - Crisis Intervention - Windermere international summer school - Codes of Gender - An aging schedule classifies accounts receivable based on - Discussion response - Wii mega drive emulator - Sap archivelink configuration guide - 26 derribong close karana downs qld 4306 - The boy in the striped pajamas learning links answers