Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

J'rngrim 2: Rack-Paper-Scissors (1 mars 1.) Wnte pwrum a play the guine Rank-Taxr-Scissors. Here are the entera Your LXZindals.py inest start with uchun ID IAIN

image text in transcribedimage text in transcribedimage text in transcribed

J'rngrim 2: Rack-Paper-Scissors (1 mars 1.) Wnte pwrum a play the guine "Rank-Taxr-Scissors. Here are the entera Your LXZindals.py" inest start with uchun ID IAIN AND include erikat indicates its puses of the program. EACIIthe four helper cuns s well as the niniu function mesiace is purus in ill is. Forinis siun. one or more space characiers Musl separate curul elements as shown). The act number....hather you use l. 2, ar more space chandlers, will nucime the correctness of year solution. very line of coile will should be inside of function. The ninin function in our proprium must hund pay game heen provided for you. Copy this function into your program EXACTLY i writea: play 4 iena Main purple play per on are of Ex- O-SCIER D play An the computer cot play game 1 : Show Pules player - yet_player_choice computer - gar_corputar cho.ca() cecoue winner player computer . As you can see, play_gamell calls FOUR helper funktions incly: show rules): Display the title and game rules (refer to screenshot for details) get_player chulce(): Prompi the player for a sletion rock, paper, or scissors). Il not necessary to error check the input. Assume the player will enter one of the three possible choices Kelur he player's selections a lowercase string get computer choice(): Make the computer's selection by zeneating a mondom number. For this, you must USC Inprrandon and randon.randi propriately. Only call YA dint ance for each call to AE computer choice. Assume 1 ireans rock, 2 means paper, and 3 means 'issors. Display and return the computer's selection as n lowercast strin declare water player, computer: D ie upon and print out the winner wing the camera ca and the two choices izde libere is a tice, the same should display Winner. Draw The umplu vulput provided shows you three sample rulls. Your outpul should be Similar but reflect the player and computer choices conccidy. >> play ) . Rack-Paner-scissors --- Rules: Each player cheuses 5ther mork, piper, or scissors The winner i determined by the following ruless rock sashes scisors -> rark wins scissers cat paper -> scissors winx paper covers rack paper wins Player rhoires paper Computer choice! Pack Winner: player >> play * Rock Paper Scissors *** Rules! Each player choses either rock, paper, or scissor The winner is determined by the following rules! rock Seishes scissors -> rock wins scissors cuts paper -> Scissors wins apri Crvers rock - paper wins Player cholces uit Coqputer choice paper winner: congter > play game - Rock-Paper-Scissors ces Rules: Each player chooses either rock, paper, ar scissors. The winner is detenuined by the following rules! rack smashes scissors -> rock wins scissors cuts paper - iskars wins paper cover's rock - paper wins Player choice: scissors Computer choicei scissors Winner: Orav Test your prograini Type: play gate() at the enmad line and observe the results. Don't forget to test cach lunction as you build it too Make any corrections nccessary. b) Save your programas "L5Q2initials.py" replacing initials with your actual initials. c) Submit your program electronically for marking (unless otherwise lestricte). J'rngrim 2: Rack-Paper-Scissors (1 mars 1.) Wnte pwrum a play the guine "Rank-Taxr-Scissors. Here are the entera Your LXZindals.py" inest start with uchun ID IAIN AND include erikat indicates its puses of the program. EACIIthe four helper cuns s well as the niniu function mesiace is purus in ill is. Forinis siun. one or more space characiers Musl separate curul elements as shown). The act number....hather you use l. 2, ar more space chandlers, will nucime the correctness of year solution. very line of coile will should be inside of function. The ninin function in our proprium must hund pay game heen provided for you. Copy this function into your program EXACTLY i writea: play 4 iena Main purple play per on are of Ex- O-SCIER D play An the computer cot play game 1 : Show Pules player - yet_player_choice computer - gar_corputar cho.ca() cecoue winner player computer . As you can see, play_gamell calls FOUR helper funktions incly: show rules): Display the title and game rules (refer to screenshot for details) get_player chulce(): Prompi the player for a sletion rock, paper, or scissors). Il not necessary to error check the input. Assume the player will enter one of the three possible choices Kelur he player's selections a lowercase string get computer choice(): Make the computer's selection by zeneating a mondom number. For this, you must USC Inprrandon and randon.randi propriately. Only call YA dint ance for each call to AE computer choice. Assume 1 ireans rock, 2 means paper, and 3 means 'issors. Display and return the computer's selection as n lowercast strin declare water player, computer: D ie upon and print out the winner wing the camera ca and the two choices izde libere is a tice, the same should display Winner. Draw The umplu vulput provided shows you three sample rulls. Your outpul should be Similar but reflect the player and computer choices conccidy. >> play ) . Rack-Paner-scissors --- Rules: Each player cheuses 5ther mork, piper, or scissors The winner i determined by the following ruless rock sashes scisors -> rark wins scissers cat paper -> scissors winx paper covers rack paper wins Player rhoires paper Computer choice! Pack Winner: player >> play * Rock Paper Scissors *** Rules! Each player choses either rock, paper, or scissor The winner is determined by the following rules! rock Seishes scissors -> rock wins scissors cuts paper -> Scissors wins apri Crvers rock - paper wins Player cholces uit Coqputer choice paper winner: congter > play game - Rock-Paper-Scissors ces Rules: Each player chooses either rock, paper, ar scissors. The winner is detenuined by the following rules! rack smashes scissors -> rock wins scissors cuts paper - iskars wins paper cover's rock - paper wins Player choice: scissors Computer choicei scissors Winner: Orav Test your prograini Type: play gate() at the enmad line and observe the results. Don't forget to test cach lunction as you build it too Make any corrections nccessary. b) Save your programas "L5Q2initials.py" replacing initials with your actual initials. c) Submit your program electronically for marking (unless otherwise lestricte). mgram 21 Rock-Puper-kewors (30 uur) D) Write pra eu play the game 'Rock-Paper- s'. Here the criteria: . Your rrum "L.SON S.py" mul Nuri wish amment ID U AND include N comment that indientes the purpos nf the program EACH of the trener usuwulinai runcligt ville i FEIN MIT 16 For iis question, one or more pece chirciers musi prin Oppleren en xhuywn). The e number, 1e, whether you 1, 2, ur bare spuce chuna.C, Will Hal inputs collecties of your uslurlon. - Eroty line of cude written skulle inside of function The inaint cunction in your programmu Tamul provided for you. Copy this function :ll your pray luy_ (). It heen EXACTLY HK written play game toestelyor Cunellona La WAY w UE ukaper-1MMOR harveen che playet and the computer de play game (1 S1OW_rules! player - qat player whicc! computer - get computer choice i ceclare warner player, computer) . As you can see, play game calls FOUR helper functions namely: show rules : Display the title and game rules (refer to screenshot for details) get piuye: choice(): Prompt the player for a selection (rock, paper, or scixurs). It is not necessary to ellor check the pul. Assume the player will enter one of the three punsible choices. Rctum the player's selection as a lowercase string get computer choice : Make the compusce's sclcction by generating a rundum number. For this you must userport randon and raidon.randint approprintely. Only call randint amce for each call to get computer_choice, ANNUNU 1 incans rock 2 means lope, and 3 means scissors. Display and return the computer's selection as n lowercase string declare_winner inlayer, computeri: Ducide upon and print out the winner using the game rules and the twn chalces mode. If there is a tie, the game should dasplay 'Wianer: Drow" THE N E vuspury similar but reflect the player and computer choices correctly. play some() - Rock-Paper-Scissors 41 Rulesi Each player chooses either rack, paper, or scissors The winner is determined by the following rules: rack snashes sclusars - rock wins scissors cuts paper -> scissors wins paper covers Fork paper wirs Player choice! paper Computer choice: rock winner player >> play ) *Rock-Paper Scissors Rules: Each player chooses either rock, paper, or scissors. The winner is detenined by the following rules! rock sashes scissors - rock wins scissors cuts paper -> scissors wins paper covers rock > paper wins Player choice: rock Computer choice! paper Winner computer " player *** Rock-Paper-Scissors + Rules: Cach player chooses either rock, paper, or scissors. The winner is determined by the following rules: rock smashes scissors -> rock wins scissors cuts paper -> scissors wins paper covers rock -> paper wins Player choice: scissors Computer choice: scissors winner: Oran Test your program! Type: playbow() at the command line and observe the results. Don't forget to test cach function as you build it 100. Make any corrections necessary. b) Save your program as "L5Q2initials.py" replacing initials with your actual Initials. c) Submit your program electronically for Marking (unless otherwise instructed). J'rngrim 2: Rack-Paper-Scissors (1 mars 1.) Wnte pwrum a play the guine "Rank-Taxr-Scissors. Here are the entera Your LXZindals.py" inest start with uchun ID IAIN AND include erikat indicates its puses of the program. EACIIthe four helper cuns s well as the niniu function mesiace is purus in ill is. Forinis siun. one or more space characiers Musl separate curul elements as shown). The act number....hather you use l. 2, ar more space chandlers, will nucime the correctness of year solution. very line of coile will should be inside of function. The ninin function in our proprium must hund pay game heen provided for you. Copy this function into your program EXACTLY i writea: play 4 iena Main purple play per on are of Ex- O-SCIER D play An the computer cot play game 1 : Show Pules player - yet_player_choice computer - gar_corputar cho.ca() cecoue winner player computer . As you can see, play_gamell calls FOUR helper funktions incly: show rules): Display the title and game rules (refer to screenshot for details) get_player chulce(): Prompi the player for a sletion rock, paper, or scissors). Il not necessary to error check the input. Assume the player will enter one of the three possible choices Kelur he player's selections a lowercase string get computer choice(): Make the computer's selection by zeneating a mondom number. For this, you must USC Inprrandon and randon.randi propriately. Only call YA dint ance for each call to AE computer choice. Assume 1 ireans rock, 2 means paper, and 3 means 'issors. Display and return the computer's selection as n lowercast strin declare water player, computer: D ie upon and print out the winner wing the camera ca and the two choices izde libere is a tice, the same should display Winner. Draw The umplu vulput provided shows you three sample rulls. Your outpul should be Similar but reflect the player and computer choices conccidy. >> play ) . Rack-Paner-scissors --- Rules: Each player cheuses 5ther mork, piper, or scissors The winner i determined by the following ruless rock sashes scisors -> rark wins scissers cat paper -> scissors winx paper covers rack paper wins Player rhoires paper Computer choice! Pack Winner: player >> play * Rock Paper Scissors *** Rules! Each player choses either rock, paper, or scissor The winner is determined by the following rules! rock Seishes scissors -> rock wins scissors cuts paper -> Scissors wins apri Crvers rock - paper wins Player cholces uit Coqputer choice paper winner: congter > play game - Rock-Paper-Scissors ces Rules: Each player chooses either rock, paper, ar scissors. The winner is detenuined by the following rules! rack smashes scissors -> rock wins scissors cuts paper - iskars wins paper cover's rock - paper wins Player choice: scissors Computer choicei scissors Winner: Orav Test your prograini Type: play gate() at the enmad line and observe the results. Don't forget to test cach lunction as you build it too Make any corrections nccessary. b) Save your programas "L5Q2initials.py" replacing initials with your actual initials. c) Submit your program electronically for marking (unless otherwise lestricte). J'rngrim 2: Rack-Paper-Scissors (1 mars 1.) Wnte pwrum a play the guine "Rank-Taxr-Scissors. Here are the entera Your LXZindals.py" inest start with uchun ID IAIN AND include erikat indicates its puses of the program. EACIIthe four helper cuns s well as the niniu function mesiace is purus in ill is. Forinis siun. one or more space characiers Musl separate curul elements as shown). The act number....hather you use l. 2, ar more space chandlers, will nucime the correctness of year solution. very line of coile will should be inside of function. The ninin function in our proprium must hund pay game heen provided for you. Copy this function into your program EXACTLY i writea: play 4 iena Main purple play per on are of Ex- O-SCIER D play An the computer cot play game 1 : Show Pules player - yet_player_choice computer - gar_corputar cho.ca() cecoue winner player computer . As you can see, play_gamell calls FOUR helper funktions incly: show rules): Display the title and game rules (refer to screenshot for details) get_player chulce(): Prompi the player for a sletion rock, paper, or scissors). Il not necessary to error check the input. Assume the player will enter one of the three possible choices Kelur he player's selections a lowercase string get computer choice(): Make the computer's selection by zeneating a mondom number. For this, you must USC Inprrandon and randon.randi propriately. Only call YA dint ance for each call to AE computer choice. Assume 1 ireans rock, 2 means paper, and 3 means 'issors. Display and return the computer's selection as n lowercast strin declare water player, computer: D ie upon and print out the winner wing the camera ca and the two choices izde libere is a tice, the same should display Winner. Draw The umplu vulput provided shows you three sample rulls. Your outpul should be Similar but reflect the player and computer choices conccidy. >> play ) . Rack-Paner-scissors --- Rules: Each player cheuses 5ther mork, piper, or scissors The winner i determined by the following ruless rock sashes scisors -> rark wins scissers cat paper -> scissors winx paper covers rack paper wins Player rhoires paper Computer choice! Pack Winner: player >> play * Rock Paper Scissors *** Rules! Each player choses either rock, paper, or scissor The winner is determined by the following rules! rock Seishes scissors -> rock wins scissors cuts paper -> Scissors wins apri Crvers rock - paper wins Player cholces uit Coqputer choice paper winner: congter > play game - Rock-Paper-Scissors ces Rules: Each player chooses either rock, paper, ar scissors. The winner is detenuined by the following rules! rack smashes scissors -> rock wins scissors cuts paper - iskars wins paper cover's rock - paper wins Player choice: scissors Computer choicei scissors Winner: Orav Test your prograini Type: play gate() at the enmad line and observe the results. Don't forget to test cach lunction as you build it too Make any corrections nccessary. b) Save your programas "L5Q2initials.py" replacing initials with your actual initials. c) Submit your program electronically for marking (unless otherwise lestricte). mgram 21 Rock-Puper-kewors (30 uur) D) Write pra eu play the game 'Rock-Paper- s'. Here the criteria: . Your rrum "L.SON S.py" mul Nuri wish amment ID U AND include N comment that indientes the purpos nf the program EACH of the trener usuwulinai runcligt ville i FEIN MIT 16 For iis question, one or more pece chirciers musi prin Oppleren en xhuywn). The e number, 1e, whether you 1, 2, ur bare spuce chuna.C, Will Hal inputs collecties of your uslurlon. - Eroty line of cude written skulle inside of function The inaint cunction in your programmu Tamul provided for you. Copy this function :ll your pray luy_ (). It heen EXACTLY HK written play game toestelyor Cunellona La WAY w UE ukaper-1MMOR harveen che playet and the computer de play game (1 S1OW_rules! player - qat player whicc! computer - get computer choice i ceclare warner player, computer) . As you can see, play game calls FOUR helper functions namely: show rules : Display the title and game rules (refer to screenshot for details) get piuye: choice(): Prompt the player for a selection (rock, paper, or scixurs). It is not necessary to ellor check the pul. Assume the player will enter one of the three punsible choices. Rctum the player's selection as a lowercase string get computer choice : Make the compusce's sclcction by generating a rundum number. For this you must userport randon and raidon.randint approprintely. Only call randint amce for each call to get computer_choice, ANNUNU 1 incans rock 2 means lope, and 3 means scissors. Display and return the computer's selection as n lowercase string declare_winner inlayer, computeri: Ducide upon and print out the winner using the game rules and the twn chalces mode. If there is a tie, the game should dasplay 'Wianer: Drow" THE N E vuspury similar but reflect the player and computer choices correctly. play some() - Rock-Paper-Scissors 41 Rulesi Each player chooses either rack, paper, or scissors The winner is determined by the following rules: rack snashes sclusars - rock wins scissors cuts paper -> scissors wins paper covers Fork paper wirs Player choice! paper Computer choice: rock winner player >> play ) *Rock-Paper Scissors Rules: Each player chooses either rock, paper, or scissors. The winner is detenined by the following rules! rock sashes scissors - rock wins scissors cuts paper -> scissors wins paper covers rock > paper wins Player choice: rock Computer choice! paper Winner computer " player *** Rock-Paper-Scissors + Rules: Cach player chooses either rock, paper, or scissors. The winner is determined by the following rules: rock smashes scissors -> rock wins scissors cuts paper -> scissors wins paper covers rock -> paper wins Player choice: scissors Computer choice: scissors winner: Oran Test your program! Type: playbow() at the command line and observe the results. Don't forget to test cach function as you build it 100. Make any corrections necessary. b) Save your program as "L5Q2initials.py" replacing initials with your actual Initials. c) Submit your program electronically for Marking (unless otherwise instructed)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

Discuss the differences between all of the file systems

Answered: 1 week ago