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
Why do many experts recommand longer time horizonal if you are doing high risk investment
Lapatulllka [165]

Answer:In general, the longer your time horizon, the better you can handle fluctuations in value and take more risk in order to reap greater rewards.

Explanation:

5 0
3 years ago
The spreadsheet ends after you reach column Z and row 99. True or false
Mandarinka [93]

Answer:

False

Explanation:

Excel Spreadsheet 2010 and above have 2^14 columns i.e. 16384 columns and 2^20 rows i.e. 1048576 rows.

First 26 columns are from A to Z and then the next column will user another Digit and start with A, so the 27th column will be AA.

26th column = Z

27th column = AA

28th column = AB

etc.

8 0
3 years ago
Briefly explain how developers use a distributed version management system. You may assume that a master repository has been set
Akimi4 [234]

Answer:

Using version control tools like Git and Github.

Explanation:

Version control is a vital tool in programming in recent times. it helps to prevent loss of source codebase and creating unwanted folders for storing multiple codebases to prevent excess storage usage and time consumption.

Git and Github is a platform that handles version control and collaboration between co-workers. When a repository is created, its initial branch is called the master branch and when a staged code is committed, the commit is recorded. These records can be retrieved using the commit hash value and resetting the current unstaged file or code. A new branch can created to hold a different version of an application and merged later with the master branch.

4 0
3 years ago
Jason attempts to hack into a banking site to steal customer information. He finds the security of the Web site lacking and is a
r-ruslan [8.4K]

Answer:

honey pot

Explanation:

Jason attempts to hack into a banking site to steal customer information. He finds the security of the Web site lacking and is able to access the site with ease. Jason is arrested the next day and charged with computer crime. The banking site was able to track​ Jason's IP address because he had unknowingly attacked a honey pot.

8 0
3 years ago
Google+ hangouts is connected to what other social media site?
Lynna [10]

Google Plus is the social media site that is connected with Hangouts.

 

To add, Google Plus<span> <span>is an interest-based </span></span>social network<span> <span>that is owned and operated by </span></span>Google. G<span>oogle's fourth foray into social networking, experienced strong growth in its initial years, although usage statistics have varied, depending on how the service is defined.<span> </span></span>

3 0
3 years ago
Other questions:
  • What is the correct method to use Dreamweaver to find broken links and orphaned files?
    15·1 answer
  • A software firm is going to develop an application for the automation of various office activities within an organization. In th
    13·1 answer
  • TABLE TEST
    12·1 answer
  • Using media allows us to:
    15·1 answer
  • The list method reverse reverses the elements in the list. Define a function named reverse that reverses the elements in its lis
    10·1 answer
  • What can i use to erase data off computer and what name of it and steps
    9·1 answer
  • An individual involved with the aspect of a project will be concerned with budgets and the costs associated with running a busin
    10·2 answers
  • Write the following program: Use struct data type to store information about courses. Every course is characterized by the follo
    6·1 answer
  • What are computer specification​
    12·2 answers
  • Value (related to the five 'v's' of big data) addresses the pursuit of a meaningful goal. true false
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!