whatever game is easiest
Page 1 of 3 Page 1 of 3 (PRO) Project Assignment Instructions Last Changed: 8/18/2020 9:03 AM Read and follow the directions below carefully and perform the steps in the order listed. You will be solving one program as instructed and turning in your work electronically via an uploaded file within Eagle Online/Canvas and copy & paste the program to the Text Entry box as well. Make sure and check your work prior to uploading the assignment. Instructions 1. Using Python IDLE, create a New Empty Script File in your working drive. Note: refer to (SET) How to Download Install and Use Python IDLE link within module 2 on how to create a script file 2. Save the script file with the name PROLastFirst, making sure to know where you saved it NOTE: Where LastFirst is your actual Lastname and Firstname. For Example, if your name is Mary Smith then your file name should be named: PROSmithMary.py (Reminder: You don’t need to add the .py extension, IDLE will automatically add the extension) 3. You will develop ONE GAME of your choice from the list of games described below: NOTE: Make sure to follow the requirements below the game you choose and the GUIDELINES to follow in step 4. (Easy) Hi-Lo Guessing game: Have the computer generate a random number* between 1 and 100. This will now be the secret number. Use a for loop to allow users to have 10 chances to guess the number (you can use a while loop if desired to give user unlimited tries, ex: while user has not guessed the number). Prompt user for a number between 1 and 100. Read in the number. If the number is less than the secret number, print a message stating it’s too low. Else if the number is higher than the secret number, print a message stating it’s too high. Else if the number is == to the secret number, then print an appropriate message and exit *For example, to generate a random number between 1 and 10, you will need the following code: import random secret_number = random.randint(1,10) (Easy) Mad Libs: Create a story with blanks. For example: Last month, I went to ________ (city) with __________ (name of person). We traveled for __________(number) hours by __________(vehicle). The following website contains samples, but you can come up with your own or modify one you find on-line: http://www.teach-nology.com/worksheets/language_arts/madlibs/ Make sure the story is appropriate for all ages! The story must be longer than one sentence! I only included a sentence above as an example, but your story should be at least one paragraph with at the least 8 to 10 sentences. Prompt the user for the necessary words. For example, for our short example listed above, I would prompt the user for a name of a person (read it in as a string). Then I would prompt them for a number (read it in as a double) and then prompt them for a vehicle (read it in as a string). Then print out the story with the words that the user entered: Last month, I went to Paris with Oprah. We traveled for 1000 hours by bicycle. The story will vary depending on what the user entered. There are many examples of this online http://www.teach-nology.com/worksheets/language_arts/madlibs/ Page 2 of 3 Page 2 of 3 (http://www.redkid.net/madlibs/). (Optional) To make the program more robust, have more than one story available, and use random number to pick the story or have user pick the story. Make it as simple or complex as you like! (Easy) Magic 8-ball: Prompt the user to enter a yes or no question (Will it rain? Will I make an A? etc…). Read in the question: read in the line using input() Generate a random number between 0-7. Create an array of strings with 8 items. The 8 strings will all be yes/no type phrases (“Absolutely!!!”, “There is no way that will ever happen!”, etc.). Based on the random number, print out the position in the array. If you’re not sure what a magic 8-ball is, you can pick another project (Easy) Funny Face: Prompt the user for one character to represent a nose. Read in the character. Prompt the user for one character to represent an eye. Read in the character. Prompt the user for one character to represent a mouth. Read in the character. Based on the characters entered, print out a funny face. (Optional, but recommended) To make the program more robust, use a random number to choose between a few different funny faces so they aren’t always the same. Here is an example: Enter a nose: < enter="" an="" eye:="" x="" enter="" a="" mouth:="" -="" |||||="" \="" x="" x="" @="">< @ --- (easy to moderate) palindrome: prompt the user for a word or phrase. read in the word or phrase (it’s up to you if you want to deal with phrases). check to see if it’s a palindrome. if you use a phrase, ignore spaces and punctuation. print out an appropriate response. (moderate) rock/paper/scissors: have user enter a rock (r), paper (p) or scissor (s) or you can have them choose from a menu. have computer randomly generate its own guess (random number between 0-2 and then assign a value based on random number). print out the computer’s guess and user’s choice and tell the user who won. remember, rock beats scissors, rock loses to paper, paper beats rock, paper loses to scissors, scissors beats paper, scissor loses to rock. (optional: a more advanced version is using the version of the game from the big bang theory). (moderate) tic/tac/toe: have two users play against each other, which is easier than playing against the computer. you will want to use a 2-dimensional array to create a board. for advanced users, this is a great game to try out. (hard games) hangman -or- memory -or- battleship (optional) if you would like to write more than one game, create a menu of games for the user to choose. for http://www.redkid.net/madlibs/ page 3 of 3 page 3 of 3 example: 1436 games menu ------------------------- 1. hi/lo guess 2. madlibs 3. magic 8 4. tic/tac/toe 0. quit 4. make sure to follow the guidelines below: a. you must make your program modular: write your program using at least 2 functions (apart from the main function), though 3 or more functions will be required for making the highest possible grade. for example, if you chose to create the hi-lo guessing game, have a function to read in the number, have a function to create the random number perhaps, etc… b. your program should be your own design: that is, if i have code that is similar to any of these games in you canvas course modules, you must change my code (do not copy it exactly). for example, i have included a madlibs program in one of the modules. make sure that you change the story if you want to write a madllbs program, and of course, use functions (as discussed in step a above). c. you must use descriptive/appropriate identifiers: your program should have descriptive variables (example: guess_number, input_number, etc.) and constants (example: game_title, line, etc.) d. you must include documentation: have enough documentation for understandability of your program by including comment block at the top including the name of the game and a brief description of the game, as well as prior to each function describe in your own words the purpose of that function (refer to textbook example programs) e. you must include indentation and spacing: your program should have proper indentation and line spacing for readability of your program (refer to textbook example programs) f. your program should look professional: that is, no typos! use capital letters at the beginning of a sentence or phrase, use punctuation when appropriate, make the output neat, etc. g. have fun in developing the game of your choice! ���� 5. after completing your project following the guidelines mentioned in step 3, make sure to run your program file to obtain the output/result as required. 6. you may now proceed to program assignment instructions and upload link within this module and follow the steps in the link or from steps below to submit your work as a text entry as well as file upload (an attached .py file): a. first, to submit your program as text entry, follow the steps below: • choose the submit assignment button (top right), • choose text entry tab, • copy/paste your python code from the program/script file to the text box, • choose submit assignment to complete the text entry submission. b. now, to submit your python code as a file upload, follow the steps below: • choose the re-submit assignment button (top right), • make sure file upload tab is selected this time, • choose browse to locate your program/script file to add (prolastfirst.py file), • choose submit assignment to complete program/script file upload. (pro) project assignment instructions @="" ---="" ="" (easy="" to="" moderate)="" palindrome:="" ="" prompt="" the="" user="" for="" a="" word="" or="" phrase.="" ="" read="" in="" the="" word="" or="" phrase="" (it’s="" up="" to="" you="" if="" you="" want="" to="" deal="" with="" phrases).="" ="" check="" to="" see="" if="" it’s="" a="" palindrome.="" if="" you="" use="" a="" phrase,="" ignore="" spaces="" and="" punctuation.="" ="" print="" out="" an="" appropriate="" response.="" ="" (moderate)="" rock/paper/scissors:="" ="" have="" user="" enter="" a="" rock="" (r),="" paper="" (p)="" or="" scissor="" (s)="" or="" you="" can="" have="" them="" choose="" from="" a="" menu.="" have="" computer="" randomly="" generate="" its="" own="" guess="" (random="" number="" between="" 0-2="" and="" then="" assign="" a="" value="" based="" on="" random="" number).="" print="" out="" the="" computer’s="" guess="" and="" user’s="" choice="" and="" tell="" the="" user="" who="" won.="" remember,="" rock="" beats="" scissors,="" rock="" loses="" to="" paper,="" paper="" beats="" rock,="" paper="" loses="" to="" scissors,="" scissors="" beats="" paper,="" scissor="" loses="" to="" rock.="" (optional:="" a="" more="" advanced="" version="" is="" using="" the="" version="" of="" the="" game="" from="" the="" big="" bang="" theory).="" ="" (moderate)="" tic/tac/toe:="" ="" have="" two="" users="" play="" against="" each="" other,="" which="" is="" easier="" than="" playing="" against="" the="" computer.="" you="" will="" want="" to="" use="" a="" 2-dimensional="" array="" to="" create="" a="" board.="" for="" advanced="" users,="" this="" is="" a="" great="" game="" to="" try="" out.="" ="" (hard="" games)="" hangman="" -or-="" memory="" -or-="" battleship="" ="" (optional)="" if="" you="" would="" like="" to="" write="" more="" than="" one="" game,="" create="" a="" menu="" of="" games="" for="" the="" user="" to="" choose.="" for="" http://www.redkid.net/madlibs/="" page="" 3="" of="" 3="" page="" 3="" of="" 3="" example:="" 1436="" games="" menu="" -------------------------="" 1.="" hi/lo="" guess="" 2.="" madlibs="" 3.="" magic="" 8="" 4.="" tic/tac/toe="" 0.="" quit="" 4.="" make="" sure="" to="" follow="" the="" guidelines="" below:="" a.="" you="" must="" make="" your="" program="" modular:="" write="" your="" program="" using="" at="" least="" 2="" functions="" (apart="" from="" the="" main="" function),="" though="" 3="" or="" more="" functions="" will="" be="" required="" for="" making="" the="" highest="" possible="" grade.="" for="" example,="" if="" you="" chose="" to="" create="" the="" hi-lo="" guessing="" game,="" have="" a="" function="" to="" read="" in="" the="" number,="" have="" a="" function="" to="" create="" the="" random="" number="" perhaps,="" etc…="" b.="" your="" program="" should="" be="" your="" own="" design:="" that="" is,="" if="" i="" have="" code="" that="" is="" similar="" to="" any="" of="" these="" games="" in="" you="" canvas="" course="" modules,="" you="" must="" change="" my="" code="" (do="" not="" copy="" it="" exactly).="" for="" example,="" i="" have="" included="" a="" madlibs="" program="" in="" one="" of="" the="" modules.="" make="" sure="" that="" you="" change="" the="" story="" if="" you="" want="" to="" write="" a="" madllbs="" program,="" and="" of="" course,="" use="" functions="" (as="" discussed="" in="" step="" a="" above).="" c.="" you="" must="" use="" descriptive/appropriate="" identifiers:="" your="" program="" should="" have="" descriptive="" variables="" (example:="" guess_number,="" input_number,="" etc.)="" and="" constants="" (example:="" game_title,="" line,="" etc.)="" d.="" you="" must="" include="" documentation:="" have="" enough="" documentation="" for="" understandability="" of="" your="" program="" by="" including="" comment="" block="" at="" the="" top="" including="" the="" name="" of="" the="" game="" and="" a="" brief="" description="" of="" the="" game,="" as="" well="" as="" prior="" to="" each="" function="" describe="" in="" your="" own="" words="" the="" purpose="" of="" that="" function="" (refer="" to="" textbook="" example="" programs)="" e.="" you="" must="" include="" indentation="" and="" spacing:="" your="" program="" should="" have="" proper="" indentation="" and="" line="" spacing="" for="" readability="" of="" your="" program="" (refer="" to="" textbook="" example="" programs)="" f.="" your="" program="" should="" look="" professional:="" that="" is,="" no="" typos!="" use="" capital="" letters="" at="" the="" beginning="" of="" a="" sentence="" or="" phrase,="" use="" punctuation="" when="" appropriate,="" make="" the="" output="" neat,="" etc.="" g.="" have="" fun="" in="" developing="" the="" game="" of="" your="" choice!="" ����="" 5.="" after="" completing="" your="" project="" following="" the="" guidelines="" mentioned="" in="" step="" 3,="" make="" sure="" to="" run="" your="" program="" file="" to="" obtain="" the="" output/result="" as="" required.="" 6.="" you="" may="" now="" proceed="" to="" program="" assignment="" instructions="" and="" upload="" link="" within="" this="" module="" and="" follow="" the="" steps="" in="" the="" link="" or="" from="" steps="" below="" to="" submit="" your="" work="" as="" a="" text="" entry="" as="" well="" as="" file="" upload="" (an="" attached="" .py="" file):="" a.="" first,="" to="" submit="" your="" program="" as="" text="" entry,="" follow="" the="" steps="" below:="" •="" choose="" the="" submit="" assignment="" button="" (top="" right),="" •="" choose="" text="" entry="" tab,="" •="" copy/paste="" your="" python="" code="" from="" the="" program/script="" file="" to="" the="" text="" box,="" •="" choose="" submit="" assignment="" to="" complete="" the="" text="" entry="" submission.="" b.="" now,="" to="" submit="" your="" python="" code="" as="" a="" file="" upload,="" follow="" the="" steps="" below:="" •="" choose="" the="" re-submit="" assignment="" button="" (top="" right),="" •="" make="" sure="" file="" upload="" tab="" is="" selected="" this="" time,="" •="" choose="" browse="" to="" locate="" your="" program/script="" file="" to="" add="" (prolastfirst.py="" file),="" •="" choose="" submit="" assignment="" to="" complete="" program/script="" file="" upload.="" (pro)="" project="" assignment=""> @ --- (easy to moderate) palindrome: prompt the user for a word or phrase. read in the word or phrase (it’s up to you if you want to deal with phrases). check to see if it’s a palindrome. if you use a phrase, ignore spaces and punctuation. print out an appropriate response. (moderate) rock/paper/scissors: have user enter a rock (r), paper (p) or scissor (s) or you can have them choose from a menu. have computer randomly generate its own guess (random number between 0-2 and then assign a value based on random number). print out the computer’s guess and user’s choice and tell the user who won. remember, rock beats scissors, rock loses to paper, paper beats rock, paper loses to scissors, scissors beats paper, scissor loses to rock. (optional: a more advanced version is using the version of the game from the big bang theory). (moderate) tic/tac/toe: have two users play against each other, which is easier than playing against the computer. you will want to use a 2-dimensional array to create a board. for advanced users, this is a great game to try out. (hard games) hangman -or- memory -or- battleship (optional) if you would like to write more than one game, create a menu of games for the user to choose. for http://www.redkid.net/madlibs/ page 3 of 3 page 3 of 3 example: 1436 games menu ------------------------- 1. hi/lo guess 2. madlibs 3. magic 8 4. tic/tac/toe 0. quit 4. make sure to follow the guidelines below: a. you must make your program modular: write your program using at least 2 functions (apart from the main function), though 3 or more functions will be required for making the highest possible grade. for example, if you chose to create the hi-lo guessing game, have a function to read in the number, have a function to create the random number perhaps, etc… b. your program should be your own design: that is, if i have code that is similar to any of these games in you canvas course modules, you must change my code (do not copy it exactly). for example, i have included a madlibs program in one of the modules. make sure that you change the story if you want to write a madllbs program, and of course, use functions (as discussed in step a above). c. you must use descriptive/appropriate identifiers: your program should have descriptive variables (example: guess_number, input_number, etc.) and constants (example: game_title, line, etc.) d. you must include documentation: have enough documentation for understandability of your program by including comment block at the top including the name of the game and a brief description of the game, as well as prior to each function describe in your own words the purpose of that function (refer to textbook example programs) e. you must include indentation and spacing: your program should have proper indentation and line spacing for readability of your program (refer to textbook example programs) f. your program should look professional: that is, no typos! use capital letters at the beginning of a sentence or phrase, use punctuation when appropriate, make the output neat, etc. g. have fun in developing the game of your choice! ���� 5. after completing your project following the guidelines mentioned in step 3, make sure to run your program file to obtain the output/result as required. 6. you may now proceed to program assignment instructions and upload link within this module and follow the steps in the link or from steps below to submit your work as a text entry as well as file upload (an attached .py file): a. first, to submit your program as text entry, follow the steps below: • choose the submit assignment button (top right), • choose text entry tab, • copy/paste your python code from the program/script file to the text box, • choose submit assignment to complete the text entry submission. b. now, to submit your python code as a file upload, follow the steps below: • choose the re-submit assignment button (top right), • make sure file upload tab is selected this time, • choose browse to locate your program/script file to add (prolastfirst.py file), • choose submit assignment to complete program/script file upload. (pro) project assignment instructions>