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
Does anyone have a rbx account? If they do friend request Tribalchief777
Mila [183]

Answer:

ok, no because this site is for hw

Explanation:

8 0
3 years ago
____________ refers to the computer-to-computer transmission of business data in a structured format.
motikmotik

Answer:

Electronic Data Interchange (EDI)

Explanation:

Electronic Data Interchange

It is the automated interchange of commercial information using a structured format. A process that allows a company to send information to another company electronically rather than on paper. Commercial entities that conduct business electronically are called business partners.

Numerous commercial documents can be exchanged using electronic data interchange, but the two most common are purchase orders and invoices. At a bottom, EDI interchanges the preparation and handling of mail associated with traditional commercial communication. However, the true power of EDI is that it standardizes the information communicated in commercial documents, which makes a "paperless" exchange possible.

6 0
3 years ago
How to scan a screenshot on Brainly?
yulyashka [42]

Answer:

You go to the option that says "snap to solve" an that's it

5 0
3 years ago
Read 2 more answers
Words have both denotative and connotative meaning. The connotative meaning is Question 2 options:
Natalka [10]

Answer:

Option b is correct answer.

Explanation:

The connotative meaning is a word's implied or secondary meaning, in addition to its literal meaning.

Connotative meaning gives an idea or a feel that invokes for a person other than literal context of the word.

Connotation tells us weather the word used is in positive context or the negative one. For example, the words childish and youthful have same denotations but connotative meaning of childish is negative while youthful lies in positive context.

i hope it will help you.

4 0
3 years ago
Imagine that you need to be late to work next Thursday because of a doctor's appointment. Compose your own e-mail appropriate fo
ratelena [41]
In form your boss a week early
8 0
3 years ago
Other questions:
  • You can use ???? a to test tread wear on your tires
    14·2 answers
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    10·1 answer
  • In the context of Information Technology Infrastructure Library, _____ delivers information technology IT services on an ongoing
    14·1 answer
  • Which of the following could not be represented by columns in the SPSS data editor? a. Levels of between-group variables. b. Lev
    11·2 answers
  • What can act as a buffer against unemployment
    11·1 answer
  • Which of the following is the correct ordering of operating systems, oldest to newest?
    5·2 answers
  • When specifying keywords to conduct an internet search, which of the following parts of speech will be the most useful??
    6·1 answer
  • Match the organelles to their functions.
    6·1 answer
  • User defined blocks of code can be created in
    13·1 answer
  • WAP to find area of circle​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!