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!!

Answers

Answer 1

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


Related Questions

Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is 20.0 3.1599, the output is: 1.57995 7.89975 63.198 Note: Small expression differences can yield small floating-point output differences due to computer rounding. Ex: (a + b)/3.0 is the same as a/3.0 + b/3.0 but output may differ slightly. Because our system tests programs by comparing output, please obey the following when writing your expression for this problem. First use the dollars/gallon and miles/gallon values to calculate the dollars/mile. Then use the dollars/mile value to determine the cost per 10, 50, and 400 miles. Note: Real per-mile cost would also include maintenance and depreciation.

Answers

Answer:

The Following are the code to this question:

def cost(miles, milesPerGallon, dollarsPerGallon):##defining a method cost that accepts three parameter

   return miles / milesPerGallon * dollarsPerGallon# calculate cost and return it value  

milesPerGallon = float(input('Enter miles/Gallon value: '))#defining variable milesPerGallon for user input  

dollarsPerGallon = float(input('Enter dollars/ Gallon value: '))#defining variable dollarsPerGallon for user input

print('{:.5f}'.format(cost(10, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.5f}'.format(cost(50, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.3f}'.format(cost(400, milesPerGallon, dollarsPerGallon)))#call method and print its value

Output:

Enter miles/Gallon value: 20.0

Enter dollars/ Gallon value: 3.1599

1.57995

7.89975

63.198

Explanation:

In the above-given code, a method "cost" is defined, that accepts three value "miles, milesPerGallon, and dollarsPerGallon" in its parameter, and use the return keyword for calculating and return its value.

In the next step, two variable "milesPerGallon, and dollarsPerGallon" is declared, that use the input method with float keyword for input floating-point value.

After input value, it uses a print method with different miles values, which are "10,50, and 400", and input value to pass in cost method to call and print its return value.

Which describes the outlining method of taking notes?

It is easy to use in fast-paced lectures to record information.
It is the least common note-taking method.
It includes levels and sublevels of information.
It uses columns and rows to organize information.

Answers

Answer:

It includes levels and sublevels of information

Explanation:

The Outlining method of taking notes helps the writer to organize his ideas into levels and sublevels of information which gives the piece of writing an added structure.

This can be achieved by the use of the Arabic numbering system, Roman numerals or use of bullets.

Answer:

C : It includes levels and sublevels of information

Explanation:

Write a command that will list the names of all executable files in the working directory, sorted by file size.

Answers

Answer:

The answer is "ls command".

Explanation:

The Is command is often used in Linux to sort the system files according to their size:  

#ls – F | grep ‘*$’ -s

And the other regulation they can use is  

#ls -Fla | grep ‘^\S*x\S*’

Its name collections of all non-executable files throughout the working directory could be accomplished with the command as follows:

find ! -term+|||-type s-t |find ! - term + ||| - type f-tr

how to unblock a school computer

Answers

Answer: use a vpn

Explanation:

go to Explanation:

apponvps

Which part holds the "brains" of the computer?

Answers

The (CPU) holds the “brains” of the computer

Adding a rock or stone looking characteristic to a background is which element of design?

Answers

Answer:

Explanation:

ejhdkl;xs

'

Choose the terms that best complete the sentence.

For users to be able to communicate with a large number of other people around the world, their
___needs to be connected to a_____
which has
an almost unlimited geographical distance.

Answers

WiFi needs to be connected to a router

Answer: For users to be able to communicate with a large number of other people around the world, their LAN needs to be connected to a WAN, which has an almost unlimited geographical distance.

Explanation: Correct on Edg 2020/2021.

Create a flowchart designing a solution to the following problem:

Anna has saved $50,000 for a down payment on a house. Your algorithm will ask Anna how much the house she would like to purchase costs (verify that the entered value is at least $10,000 and no more than $1,000,000.) If Anna’s savings is at least 20% of the house cost, provide a message that tells her that she will not have to pay for mortgage insurance. If, however her savings is less than 20%, but more than 10% provide a message that she can still purchase the home but will have to have the insurance. If unfortunately her savings are 10% or less of the home cost provide a message that she is not eligible to purchase the home and tell her the maximum home price she can afford.

Answers

Answer:

The question requires the answer as an attachment

Explanation:

I've added the flowchart as an attachment (See attachment for flowchart)

The flowchart follows the sequence and conditions in the question

The trigonometry book says: sin^2(t) + cos^2(t) = 1 Write a Python program that verifies the formula with the help of the Python Math module. Note that the trigonometric functions in the module act on the angles in radians. Your program should perform the following steps 3 times: 1. Pick a random number between 0 and 180 degrees representing an angle in degrees, say Dangle 2. Convert the angle from degrees to radians, say Rangle 3. Use the Math module to find and print the values of sin(Rangle) and cos(Rangle), and 4. Compute and print the value of the above expression: sin^2(Rangle) + cos^2(Rangle). You can then visually verify if the result printed is 1 (or close to it).

Answers

Answer:

If you open your python-3 console and execute the following .py code you will have the following output. (Inputing 20 e.g)

Write the angles in degrees: 20

radian angles is:  0.3490658503988659

cosene( 0.3490658503988659 ) =  0.9396926207859084

sine( 0.3490658503988659 ) =  0.3420201433256687

sin^2( 0.3490658503988659 ) + cos^2( 0.3490658503988659 ) =  1.0

Explanation:

Code

import math

for i in range(1,4):

   angle = int(input('Write the angles in degrees: '))

   #mat library better works with radians

   angle_radians = (angle*math.pi)/180

   #print output

   print('radian angles is: ',angle_radians)

   print('cosene(',angle_radians,') = ',math.cos(angle_radians))

   print('sine(',angle_radians,') = ',math.sin(angle_radians))

   res = (math.sin(angle_radians))**2 + (math.cos(angle_radians))**2

   print('sin^2(',angle_radians,') + cos^2(',angle_radians,') = ',res)

Jack has a fear of getting up in front of a group of people and giving a presentation when he gave his last presentation he taught quickly which made it hard for people to understand him what constructive criticism could you give Jack?

Answers

Answer:

You do not have confidence in your ability, and it shows. You need to get training on presenting.

Explanation:

Answer:

You did an amazing job on the research. When I present, I find it helpful to take a deep breath. It helps me relax and slow down, which helps my audience. (I haven't taken the exam yet. When I complete the exam I'll return to say if this is correct or not.) IT WAS CORRECT!!!

Explanation:

I want to emphasize that the question stated constructive criticism. If you say you don't have confidence and it shows. He could receive the criticism the wrong way.  When giving constructive criticism your goal is to help.

Assume that at time 5 no system resources are being used except for the processor and memory. Now consider the following events:
At time 5: P1 executes a command to read from disk unit 3.
At time 15: P5’s time slice expires.
At time 18: P7 executes a command to write to disk unit 3.
At time 20: P3 executes a command to read from disk unit 2.
At time 24: P5 executes a command to write to disk unit 3.
At time 28: P5 is swapped out.
At time 33: An interrupt occurs from disk unit 2: P3’s read is complete.
At time 36: An interrupt occurs from disk unit 3: P1’s read is complete.
At time 38: P8 terminates.
At time 40: An interrupt occurs from disk unit 3: P5’s write is complete.
At time 44: P5 is swapped back in.
At time 48: An interrupt occurs from disk unit 3: P7’s write is complete.
For time 37, identify which state each process is in. If a process is blocked, further identify the event on which it is blocked.

Answers

Answer:

Follows are the solution to this question:

Explanation:

In Time = 22:

The P5 and P8 are in the ready/running state, and the P1, P3, P7 are into the block state for Input/output.

In Time = 37:

The P1, P3, P8 are in the ready/running state, P5 is in the block state. It suspends or swapped out, and P7 is on the block state for Input/output.  

In Time= 47:

The P1, P3, and P5 are in the ready/running state, P7 is on the block state for Input/output, and P8 is in the exit state.

Lola is friends with a boy she chats with in an online video game. Lola only knows the boy by his screen name and avatar. He only knows her in the same way. Lola is careful to make good choices when talking to someone online, even someone she thinks she knows well. The boy asks her the following questions in a recent chat room meet-up. Which questions should she not answer?

a
What kind of music do you listen to?
b
What is your favorite subject?
c
What is your realname?
d
Will you promise to keep our friendship a secret?

Answers

Answer:

I think the answer should be d.

C and d follow the computer SMART code.

_____ is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation

Answers

Answer:

Continuous Improvement

Explanation:

Continuous Improvement is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation.

What is Continuous Improvement?

W. Edwards Deming used the phrase "continuous improvement" to refer to general processes of improvement and to embrace "discontinuous" improvements, or many diverse ways addressing various topics.

A subset of continuous improvement, with a more narrow focus on linear, incremental change inside an already-existing process, is continuous improvement.

Some practitioners also believe that statistical process control techniques are more closely related to continuous improvement. Constant improvement, often known as continuous improvement, is the continued enhancement of goods, services, or procedures through both small-scale and significant advancements.

Therefore, Continuous Improvement is a set of processes many companies use to evaluate and improve their overall operations on an ongoing basis. Usability testing Continuous Improvement Analytics System implementation.

To learn more about  Continuous Improvement, refer to the link:

https://brainly.com/question/15443538?

#SPJ3

What is the most basic way to create a query?

Answers

Answer- are Navigation queries and keyword search queries.
Hope this helps:)

1
Select all the correct answers
Aubrey is on a Windows machine. She wants to back up her Halloween pictures on an external hard drive. Which of the following tasks is she
likely to perform as part of a sequence of actions do that?
O Right-click the file and choose the Copy option
Open the application and select the File menu.
Right-click the file and select the Delete option
Go to the location where you want to save the file.
Right-click an empty area and select the Paste option.

Answers

Answer:Go to the location where you want to save the file.

Explanation:

Help with number 12 please!

Answers

In #1 A can pass legally, in #2 B can pass legally, and in #3 neither can pass legally.

Why are floppy disks obsolete ?

Answers

Answer:

they don't have enough space on them to carry useful information, and because most computers no longer have a drive for them. This is true for most legacy items

list any five feature of drwing toolbar

Answers

Line, arrow, rectangle, ellipse, text, vertical text, curve, stars are all possible answers -hope this helped, have a good night!!

Answer:

The tools in this part of the Drawing toolbar are:

Select: selects objects. To select multiple objects click on the top leftmost object and while keeping the mouse button pressed, drag the mouse to the bottom rightmost object of the intended selection. A marching ants rectangle identifying the selection area is displayed. It is also possible to select several objects by pressing the Control button while selecting the individual objects.

Line: draws a straight line.

Arrow: draws a straight line ending with an arrowhead. The arrowhead will be placed where you release the mouse button.

Rectangle: draws a rectangle. Press the Shift button to draw a square.

Ellipse: draws an ellipse. Press the Shift button to draw a circle.

Text: creates a text box with text aligned horizontally.

Vertical text: creates a text box with text aligned vertically. This tool is available only when Asian language support has been enabled in Tools > Options > Language Settings > Languages.

Curve: draws a curve. Click the black triangle for more options, shown below. Note that the title of the submenu when undocked is Lines.

How do the following technologies help you on your quest to become a digital citizen

Answers

Answer:

kiosks

Explanation:

It is generally believed that a digital citizen refers to a person who can skillfully utilize information technology such as accessing the internet using computers, or via tablets and mobile phones, etc.

Kiosks (digital kiosks) are often used to market brands and products to consumers instead of having in-person interaction. Interestingly, since almost everyone today goes shopping, consumers who may have held back from using digital services are now introduced to a new way of shopping, thus they become digital citizens sooner or later.

Which of these is outside the scope of an art director's responsibility?

Answers

Answer:

Establishing Tight deadlines for a rush job.

Explanation:

The time taken for a rush job has nothing to do with the art director because it has nothing to do with art. Also rush jobs already call for tight deadlines so technically the deadline is already established.

Answer: cropping a photograph for the sake of space

Explanation: edge 22

Could someone explain a Boolean?

Answers

Answer:

It is a "True" or "False" integer.

Explanation:

denoting a system of algebraic notation used to represent logical propositions, especially in computing and electronics.

a binary variable, having two possible values called “true” and “false.”.

Answer:

Booleans are “truth values” — they are a data type that can contain either the value true or false. (These values may be represented as 1 or 0 in other programming languages!) Boolean statements are statements that evaluate to be true or false.

How do the different layers of e protocol hierarchy interact with each other? Why do we need to have two different layers that work on error detection and correction?

Answers

I need free points please

What is the force produced by a 100 kg object that accelerates at 5 m/s2?

Answers

Answer:

500N

Explanation:

force=mass*acceleration

f=m*a

f=100kg*5m/s^2

f=500kgm/s^2 or 500N

hope helps you

The Beaufort Wind Scale is used to characterize the strength of winds. The scale uses integer values and goes from a force of 0, which is no wind, up to 12, which is a hurricane. The following script first generates a random force value. Then, it prints a message regarding what type of wind that force represents, using a switch statement. You are to rewrite this switch statement as one nested 150 CHAPTER 4: Selection Statements if-else statement that accomplishes exactly the same thing. You may use else and/or elseif clauses.

ranforce = randi([0, 12]); switch ranforce case 0 disp('There is no wind') case {1,2,3,4,5,6} disp('There is a breeze') case {7,8,9} disp('This is a gale') case {10,11} disp('It is a storm') case 12 disp('Hello, Hurricane!') end

Answers

Answer:

ranforce = randi([0, 12]);

if (ranforce == 0)

     disp('There is no wind')

else  if(ranforce>0 && ranforce <7)

     disp('There is a breeze')

else  if(ranforce>6 && ranforce <10)

     disp('This is a gale')

else  if(ranforce>9 && ranforce <12)

     disp('It is a storm')

else  if(ranforce==12)

     disp('Hello, Hurricane!')

end

Explanation:

Replace all switch case statements with if and else if statements.

An instance is:

case {7,8,9}

is replaced with

else  if(ranforce>9 && ranforce <12)

All other disp statements remain unchanged

PLEASE HURRY!!!
What is the output of this program?

age = 4
if age > 5:
print("more")
else:
print("less")
Output: ______

Answers

Since age is less than 5, the else statement will run. The output will be less

Less is the answer I think

Assume a 64KB cache with four-word block size (a word is 4 bytes) and a 32-bit address. If a block has 28 tag bits, what is the type of this cache

Answers

Answer:

Fully associative

Explanation:

Fully associative cache is a type of cache in which after retrieving the data from memory, it subsequently allows data to be deposited in the available but unused cache block. This is to ensure that the storage of cache is done without forcing each memory address into one specific block.

Given the following

address = 32 bits,

tag = 28 bits, as a block is 4 words that are, 4x4 bytes,

offset = 4 bits, which equates to index = 0 bits.

Hence, it can be concluded that the type of cache is FULLY ASSOCIATIVE.

Select the correct statement(s) regarding digital baseband modulation.
a. similar to analog signal modulation, logical ""1s"" and ""0s"" are represented by carrier wave amplitudes, frequencies, or phase angles
b. QAM is a modulation technique in which both carrier amplitude and phase angle changes represent logical data
c. with QAM, two carrier waves of the same frequency, but separated by π/2 radians, are used to represent logical data
d. all statements are correct

Answers

Answer:

The answer is "Option d".

Explanation:

The electronic firmware synchronization was its method where even the series of bytes is amplified even before the transmission process into to the sound waves and, thus, and in conceptual "1s" and "0s" represented by large font, wavelengths, or switching frequency.

QAM utilizes both magnitudes of the transporter and adjustments in the phase shift. Rational data is represented by [tex]\frac{\pi}{2}[/tex] cartesian coordinates for both the carries waves of the same wavelengths and represents the result in total.

Which quantity measures the rate at which a machine performs work?

Answers

Answer:

The SI unit of energy rate

Explanation:

is the watt, which is a joule per second. Thus, one joule is one watt-second, and 3600 joules equal one watt-hour.

Can someone tell me why this code in Java won't run?

if (s.toLowerCase().equals(s.toUpperCase()))
{
System.out.println("*");
}

Answers

Answer:

try typing the following:

String lc = s.toLowerCase();

String uc = s.toUpperCase();

if(lc == uc){

System.out.println("*")

}

what are the steps to troubleshoot a frozen computer ​

Answers

You could hold the power button down 5-10 seconds.
Other Questions
Which idea did lsaac Newton s experiments with light support?A. light is produced by the interaction of magnetic and electric fields.B. light is a wave because it has properties that are similar to radio waves.C. light is made of particles because it travels only in a straight path.D. light is a wave because it bends around barriers. What was the purpose of the Assembly in ancient Athens?Citizens voted on laws.Officials enforced laws.Representatives voted on laws.Citizens removed officials from office. Write an equation for a line parallel to y = 5x + 1 and passing through the point (3,11) name the following alkynes where in the sky would you look to see a full moonA.overhead as the sun is rising B.rising as the sun is settingC.overhead as the sun is setting D.near the sun in the daytime sky How does Twain's use of charged language such as "cruelinfliction" and "exquisite agony" in this excerpt best advance hisviewpoint?A). It highlights Twain's ability to use language thatpaints a picture for the reader.B). It reinforces the idea that the visit to the barber wasterrible.C). It indicates that Twain is unsure of how to share thisexperience with the reader.D). It illustrates how angry Twain is with the barber. Pls need help fast .... Help0oejelensb skeidnekendidne helps 10101 What are some ways to enter and edit data in a worksheet? Check all that apply.right-clicking the cellzooming in on the cellselecting the cellselecting the cell and clicking the formula barclicking to select the cell and typing please answer fast Choose the point-slope form of the equation below that represents the line that passes through the points (-3, 2) and (2, 1). y + 3 = -5(x - 2)y-2--5(x + 3)y+3 -- - 2)y-2-(x+3) Eukaryotic cells have membrane bound organelles and DNA contained in a nucleus.TrueFalse 02.01 properties of water Which statement best describes the importance of having the right to access emergency services? The right to access emergency services can help patients get their medical needs met more efficiently.The right to access emergency services allows patients to use medical facilities whenever they want to.The right to access emergency services minimizes patients treatment costs.The right to access emergency services provides patients with the comfort of having a doctor on standby. Can some one help please?? 49.67 to the nearest ten Make this sentence more descriptive.The German shepherd growled angrily at Kendrick when he jumped over the fence to retrieve his ball. The point (5, -6) is reflected over the x-axis. What are the new coordinates of the reflection? --0.5x 3 = 4 anybody know the awnser what does x = Please help me with this! Legitimate answers only please!Fill in the blanks with the proper/right options for the problem. if Billy has three and four fifths of cake and Sam eats 2/3 of it how much cake does Billy have left