1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vichka [17]
3 years ago
8

Write a Python 3 script in PyCharm that will simulate the game of "Rock, Paper, Scissors": Display a header and the simple rules

of RPS Prompt player_1 for their move To make sure player_2 can't see what player_1's move was, insert: print('*** NO CHEATING ***\n\n' * 20) Prompt player_2 for their move Design and develop an IF-ELSE structure to play the game IF player_1's move equivalent to player_2's move, "It's a tie" "rock" beats "scissors" "scissors" beats "paper" "paper" beats "rock" Make sure you test for valid input!!
Computers and Technology
1 answer:
mr Goodwill [35]3 years ago
7 0

Answer:

'''

Rock, Paper, Scissors:

The Rules:

If player1's move equivalent to player2's move, "It's a tie".

"rock" beats "scissors", "scissors" beats "paper", and "paper" beats "rock"

'''

player_1 = input("Player 1's move: ")

print('*** NO CHEATING ***' * 20)

player_2 = input("Player 2's move: ")

if player_1 or player_2 not in ["rock", "paper", "scissors"]:

 print("Invalid input!")

if player_1 == player_2:

   print("It's a tie")

else:

   if player_1 == "rock":

       if player_2 == "scissors":

           print("Player 1 won")

       elif player_2 == "paper":

           print("Player 2 won")

   elif player_1 == "scissors":

       if player_2 == "paper":

           print("Player 1 won")

       elif player_2 == "rock":

           print("Player 2 won")

   elif player_1 == "paper":

       if player_2 == "rock":

           print("Player 1 won")

       elif player_2 == "scissors":

           print("Player 2 won")

Explanation:

In the comment part, put the header and the rules of the game

Ask the user to enter the player1's move

Print the asterisks

Ask the user to enter the player2's move

If any of the input is not "rock", "paper", "scissors", state that the input is invalid

Check the inputs. If they are equal, print that it is a tie. Otherwise:

If player1's move is rock. Check player2's move. If it is "scissors", player1 wins. If it is "paper", player2 wins

If player1's move is scissors. Check player2's move. If it is "paper", player1 wins. If it is "rock", player2 wins

If player1's move is paper. Check player2's move. If it is "rock", player1 wins. If it is "scissors", player2 wins

You might be interested in
Cliff just started working with a client who has a very disorganized AdWords account. What’s an effective way for him to begin r
scoundrel [369]
AdWords is a service which helps to create online advertisements. It's needed to promote your business, by increasing popularity of your website or selling your products. The most effective way for Cliff is to c<span>reate campaigns based on the structure of his client’s website. He should divide his client's account into several campaigns according to website's structure.</span>
7 0
3 years ago
What is an antispamming approach where the receiving computer launches a return attack against the spammer, sending email messag
Burka [1]

Answer:

Teergrubing.

Explanation:

Teergrubing is an antis-pamming approach where the receiving computer launches a return attack against the spammer, sending email messages back to the computer that originated the suspected spam.

It is a good antis-pamming approach because it slows response to the Simple Mail Transfer Protocol (SMTP) commands, thus tying up resources.

8 0
3 years ago
Read 2 more answers
An agile team has which two characteristics? (choose two. ).
DerKrebs [107]

A SAFe Agile teams are often known to be Scrum Master and Product Owner. An Agile team characteristics are:

  • A small group typically 5 - 11 dedicated individuals who have the skills necessary to define, build, test, and deploy increments of value.

  • A group of dedicated individuals who are empowered, self-organized, self-managing, and deliver value.

A SAFe Agile team is a cross-functional group  as they are made up of about of 5-11 people who set apart, build, test, and deliver an increment of value in a short time box.

Agile team are known to be cross functional as they can define, build , test and Deploy.

See full question below

An Agile team has which two characteristics? (Choose two.)

A) A small group typically 5 - 11 dedicated individuals who have the skills necessary to define, build, test, and deploy increments of value

B) A stand-along unit of individuals who do not require input fro other teams to complete their tasks

C) A large group of individuals who all work together to create value for the client

D) A group of dedicated individuals that work in phase-gate steps to complete their PI Objectives

E) A group of dedicated individuals who are empowered, self-organized, self-managing, and deliver value

Learn more from

brainly.com/question/24390635

5 0
3 years ago
What can a parent do to help a child adjust to a new culture or area
Hitman42 [59]
Be patience, teach them about the culture.
4 0
3 years ago
Read 2 more answers
Fill in the correct term to complete the statement. _____ refers to borrowing money from a bank.
Vera_Pavlovna [14]

taking a guess here : a lone.

hope this helps.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these is a preferred method for
    14·2 answers
  • Write a program that prints the block letter “B” in a 7x7 grid of stars like this:
    13·1 answer
  • Electronic files created on a computer using programs such as word software are considered to be
    15·1 answer
  • You have activated pop-up blockers in your web browser to prevent pop-up windows from continually interrupting your browsing exp
    14·2 answers
  • Give 5 uses of software and hardware.
    15·1 answer
  • Write a function called median, that takes as parameter a full, sorted array of doubles and returns the median of the list. For
    15·1 answer
  • Should the existing system be replaced?This is a question that is asked during the _____ stage of the Systems Development Life C
    8·1 answer
  • When Creating a FPS game what basic rules would you add?
    12·1 answer
  • Write code which takes inputs and creates two Rectangle objects (using the edhesive.shapes.Rectangle class) and compares them us
    7·1 answer
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!