How do I add winning conditions to this rock paper scissors code in python? Please keep it simple as I am not allowed to include code we have not learned yet.

import random
choice = input("Enter Rock(R), Paper(P), or Scissors(S): ")
computer = random.randint(1, 3)
if computer == 1:
print("Computer played R.")
elif computer == 2:
print("Computer played P.")
else:
print("Computer played S.")

Answers

Answer 1

Answer:

You wanted simple, but i dodn't know how simple you wanted so I kept it as simple as possible, don't blame me if theres a bug.

Explanation:

import random

choice = input("Enter Rock(R), Paper(P), or Scissors(S): ")

computer = random.randint(1, 3)

if computer == 1 and choice == "R":

   print("Computer played Rock.")

   print("Tie")

elif computer == 2 and choice == "P":

   print("Computer played Paper.")

   print("Tie")

elif computer == 3 and choice == "S":

   print("Computer played Scissors.")

   print("Tie")

elif computer == 1 and choice == "S":

   print("Computer played Rock.")

   print("You Lose")

elif computer == 2 and choice == "R":

   print("Computer played Paper.")

   print("You Lose")

elif computer == 3 and choice == "P":

   print("Computer played Scissors.")

   print("You Lose")

elif computer == 1 and choice == "P":

   print("Computer played Rock.")

   print("You Win")

elif computer == 2 and choice == "S":

   print("Computer played Paper.")

   print("You Win")

elif computer == 3 and choice == "R":

   print("Computer played Scissor.")

   print("You Win")


Related Questions

What is output by the code below?

int[] nums = new int[10];

for (int i=0; i < nums.length; i++)

{

nums[i] = i*2;

}

System.out.println(nums[5]);

a.16
b. 10
c. 14
d. 18
e. 12​

Answers

Answer: I think it is a

Explanation:Sorry if it it is worng

Discuss the evolution of file system data processing and how it is helpful to understanding of the data access limitations that databases attempt to over come

Answers

Answer:

in times before the use of computers, technologist invented computers to function on disk operating systems, each computer was built to run a single, proprietary application, which had complete and exclusive control of the entire machine. the  introduction and use of computer systems that can simply run more than one application required a mechanism to ensure that applications did not write over each other's data. developers of Application addressed this problem by adopting a single standard for distinguishing disk sectors in use from those that were free by marking them accordingly.With the introduction of a file system, applications do not have any business with the physical storage medium

The evolution of the file system gave  a single level of indirection between applications and the disk the file systems originated out of the need for multiple applications to share the same storage medium. the evolution has lead to the ckean removal of data redundancy, Ease of maintenance of database,Reduced storage costs,increase in Data integrity and privacy.

Explanation:

Temperature for the month of April 2017 has been recorded by the zambia metrological department as follows : 24.0,17.5,33.0,36.5,36.0,22.5,12.5,44.0,15.5,33.0,41.5,23.5 explain in detail how these temperatures can be accessed and arranged in a 2DA matrix. Write a program to show how they can be arranged in a 3*3 matrix. Find the total sum of all the temperatures using 2DA

Answers

Answer:

The sum of the temperatures is: 336

Explanation:

2-Dimensional Array:

A two dimensional array is defined as

int temp [3] [3]  

This is how a two dimensional array is defined in C++ programming language.

Here we have defined a 2-D array named temp which can store 3*3 = 9 int values

These 9 values are stored in 3 rows and 3 columns as below:

1, 2, 3

4, 5, 6

7, 8, 9

We are given the temperature for the month of April 2017 recorded by the Zambia metro-logical department.

24.0, 17.5, 33.0, 36.5, 36.0, 22.5, 12.5, 44.0, 15.5, 33.0, 41.5, 23.5

The given temperature values are 12 therefore, we would need a matrix of 3 rows and 4 columns ( 4 rows and 3 columns is also valid)

3*4 = 12 values

These 12 values will be arrange as below:

1, 2, 3, 4

5, 6, 7, 8

9, 10, 11, 12

C++ Program:

#include <iostream>

using namespace std;

int main()

{

// initialize the number of rows and columns

   int row = 3;

   int col = 4;

// initialize variable sum to store the sum of temperature values

   int sum = 0;

// initialize 2d array with given temperature values  

   float temp[row][col] = { {24.0, 17.5, 33.0, 36.5}, {36.0, 22.5, 12.5, 44.0}, {33.0, 41.5, 23.5, 15.5} };    

// we need two for loops to keep track of rows and columns

 for(int i = 0; i < row; ++i)

   {

       for(int j = 0; j < col; ++j)

       {

// to display individual temperature values

          cout<< "temp[" << i << "][" << j << "] = " << temp[i][j] <<endl;

// to sum the elements of the 2d array

          sum+=temp[i][j];

       }    

   }

// to display the sum of temperature values

cout<<"The sum of the temperatures is: "<<sum<<endl;

return 0;

}

Output:

temp[0][0] = 24

temp[0][1] = 17.5

temp[0][2] = 33

temp[0][3] = 36.5

temp[1][0] = 36

temp[1][1] = 22.5

temp[1][2] = 12.5

temp[1][3] = 44

temp[2][0] = 33

temp[2][1] = 41.5

temp[2][2] = 23.5

temp[2][3] = 15.5

The sum of the temperatures is: 336

Note:

The index start at 0 not 1 that is why you see rows from 0 to 2 and columns from 0 to 3.

Find the error in the statement below.
if height_variable > 59;
print("You can ride this roller coaster.")
The opening parenthesis should be at the beginning of the second line.
The second line should not be indented.
The semi-colon should be a colon.
The > should be a <

Answers

Answer:

The semi-colon, should be a colon

Explanation:

The error in the statement below is a semi colon should be a colon.

What is error?

Error is defined as a violation of a code of conduct due to ignorance or imprudence. A bug is a mistake in computer data. An mistake, flaw, failure, or fault in a computer program or system that results in it producing an inaccurate or unexpected result or behaving in an unexpected manner is known as a software bug.

The second line should begin with the opening parenthesis. There is no need to indent the second line. if the measurement tool or instrument is the same between the two operators. It's not required for two operators to produce results that are similar. There are three different sorts of faults: burst errors, multiple bit errors, and single bit errors.

Thus, the error in the statement below is a semi colon should be a colon.

To learn more about error, refer to the link below:

https://brainly.com/question/19575648

#SPJ5

What G-Suite Apps integrate with Forms
Google Classroom
Google Sites
Google Sheets
All of the Above

Answers

Answer:

google sheets

Explanation:

John recently worked on a project about various programming languages. He learned that though procedural language programs are useful, they have disadvantages too. What is a disadvantage of programs written in procedural languages? A. Programs do not represent data complexity. B. Programs take more time to execute. C. Programs are prone to security threats. D. Programs do not interface with multiple platforms.

Answers

Answer:

Option A  Programs do not represent data complexity.

Explanation:

In procedural languages like C, it doesn't support object oriented design that could encapsulate data in an object that entails a set of relevant attributes and methods which can represent an entity in real life better. This means the procedural language is limited by creating an object-like data structure that can represent data complexity. The procedural language only support the running a program by following a set of instructions in order.

why are medical related professions and human resources important? ​

Answers

Answer:

See below.

Explanation:

Medical related professions are identified as one of the core building blocks of a healthcare system. The role of "medical related professionals" in healthcare industry is confined to managing safety and legal issues, ensuring efficient performance, and developing problem solving and decision-making skills.

which of the following actions do not contribute to recommedations you see online

Answers

Answer:

All of these actions contribute to recommendations you see online.

Which of the following is NOT correct?
A. Computer is capable of processing only
digital signals.
B. Appropriate software is required for
processing the data.
C. Computer is capable of processing digital
as well as analog signals.
D. Computer is capable of analyzing both
quantitative and qualitative data.

Answers

Answer:A

Explanation:

Trevor works for many different clients and creates a wide variety of business publications. Which two factors in the list below have the most influence over his layout designs? (multiple choice)


audience

color scheme

dynamic tension

goals

Answers

Answer:

• Audience

• Goals

Explanation:

Trevor works for many different clients and creates a wide variety of business publications. The two factors in the list below have the most influence over his layout designs are:

a) Audience

From the above question,we can see that Trevor creates different publications for different clients. This is because, the taste, wants or desires of each clients varies. It is not the same. Therefore, the layout of his publication is influence by the target audience that the publication is meant for.

For example, a client may want a publication with big fonts because the target audience who would be reading the publication are elderly people.

Another clients may want his publication designed with smaller fonts and a unique font style.

It is Trevor's duty to make sure that he caters to the needs his client's target audience by satisfying their desires, however different they may be.

b) Goals

The goals of the publication is one of the things that can influence the layout design of Trevor's publication. Let's take for example, a client is creating a publication to reach the teen society, probably a publication on pop music or fashion, this is the goal. Trevor would have to create the publication such that it attracts teens. The layout of the publication would have to come in catchy colours, interesting fonts, musical symbols that would catch the eye of teens and make them want to read such publication.

What is the disadvantage of server based network?

Answers

Answer:

do u have different networks too?

Answer:

The disadvantage of server based network are:

If one of the servers go down all the users are affected and it may bring the whole network down.More expensive to set up and maintain.ExpensiveAdministrating specialist staff such as a network manager is needed.

what is MICR used for​

Answers

Answer:

MICR (magnetic ink character recognition) is a technology used to verify the legitimacy or originality of paper documents, especially checks. Special ink, which is sensitive to magnetic fields, is used in the printing of certain characters on the original documents.

Explanation:

Answer:

MICR (magnetic ink character recognition) is a technology used to verify the legitimacy or originality of paper documents, especially checks. Special ink, which is sensitive to magnetic fields, is used in the printing of certain characters on the original documents.

Explanation:

Assume you need to create a presentation on the effects of global warming. Keeping the topic in mind, you need to
focus on certain key guidelines while creating the presentation. In a table, list those appropriate guidelines that you
would follow to create an effective presentation. Your table should have guidelines related to image choices, font
size for the heading and body text, background and text color for the slide, number of bullet points you will use,
and number of words per line. Also, provide your rationale about the choices for these elements.

Answers

Answer:

................................................................................................

Explanation:

on hearing my name you may think that i am interative, but i play a vital role in network by boosting the signal strenght to overcome attenuation. who am i?

Answers

Answer: A Network Repeater or Repeater

Explanation:

A Network Repeater also called Signal booster is an electronic device that receives a signal and retransmits the signals in such a way that can cover a wide range of distance without reducing the signal strength or causing Attenuation( a reduction or loss in signal strength which occurs when there is a transmission of signals over long distances).

An example is a Radio repeater.

How was the addition of an improvement over early web design?
Webpages could finally incorporate tables into the design.
Webpage layout could finally format content blocks separately.
Webpage layouts were finally designed using HTML code.
Webpages could finally incorporate images as layout elements.

Answers

Answer- B: Webpage layout could finally format content blocks separately.

Explanation: Found it on Quizlet.

Answer:

Webpage layout could finally format content blocks separately.

Explanation: this the answer on edge.

Jonah has finished his assignment and now wants to save his work with the title "Renaissance."
Which steps should Jonah follow to accomplish this?
navigate to the Quick Access bar, click the Save icon
navigate to the backstage view, click the Save As icon
click the File tab, click Save, type in the title, click Save
click the File tab, click Save As, type in the title, click Save

Answers

Answer:

Your answer is D.click the File tab, click Save As, type in the title, click Save

Explanation:

Answer:

C

Explanation:

took the quiz

How do you access the dark web? What are the negatives of doing this?

Answers

the dark web is illegal and therefore people can hack you, obtain your information (identity theft) etc.

what is network topology​

Answers

DescriptionNetwork topology is the arrangement of the elements of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial fieldbusses and computer networks.

A LAN is usually confined in a single building.
True
False

Answers

Answer:

true

Hope it helps.you

What are the benefits of using disk cleanup as part of regular maintenance on a computer? Check all of the boxes that apply.

Trash is emptied to clear space on the hard drive.

Files that are no longer needed are deleted to clear space and help the computer run faster.

Accumulated temporary files are deleted to help the computer run faster.

Unnecessary program files that may slow down the computer are deleted.

Answers

Answer:

all of the above

Explanation:

Answer:

Trash is emptied to clear space on the hard drive.

Files that are no longer needed are deleted to clear space and help the computer run faster.

Accumulated temporary files are deleted to help the computer run faster.

Unnecessary program files that may slow down the computer are deleted.

Explanation:

It's all of the above

A customer seeks to buy A new computer for private use at home. The customer primarily needs the computer to use the microsoft powerpoint application for the purpose of practising representation skills. As a salesperson what size hard disc would you recommend and why?

Answers

Answer:

I think 128GB of storage would be fine.

Explanation:

It sounds like this person he's only looking to do basic tasks as you would still have room to do other things.

How many different name servers need to be visited in order to find location of www.flamingflamingo.eu including ROOT server

Answers

Answer:

10

Explanation:

What is a user data?

Answers

Answer:   Any data the user creates or owns.

Explanation:

the user being the one on the otherside of the computer, usually a human.

but examples of user data are intalled programs, uploads, word documents created by user (computer user)

What invention do you wish existed during this quarantine? (I have to do a sales pitch for an invention in Spanish, the invention can be related to quarantine or after quarantine too.)

Answers

Answer:

Money

Explanation:

Car Insurance

what does this mean, i am so confused- Explain the importance of identifying the purpose/use for pre-production documents

brainiest to be given

Answers

Answer: These are mostly used in interior design, fashion design, and advertising. they are often used to generate ideas for a client to meet their approval before making the final product. It can help in terms of planning because it could be used to create a design or a theme.

Explanation: yw

Who do many employees think is responsible for safety in the workplace

Answers

Answer:

Supervisors.

Explanation:

Supervisors have an overall responsability to ensure the safety of the workers. They must take every precaution reasonable in the circumstances the worker is found in.

1...difference between repeater and hub .
2... difference between bridge and router .​

Answers

Answer:

Explanation:I don't say you have to mark my ans as brainliest but if you think it has really helped you plz don't forget to thank me..

1. A repeater amplifies and extends signals, while a hub is a multi-port device that broadcasts data to all connected devices, creating a shared collision domain.

2. A bridge connects network segments at the data link layer and forwards packets based on MAC addresses, while a router connects networks at the network layer and forwards packets based on IP addresses.

1. Difference between a Repeater and a Hub:

Repeater:

Operates at the physical layer (Layer 1) of the network.

Regenerates and amplifies network signals to extend their reach and overcome signal degradation.

Does not inspect or manage network traffic.

All devices connected to a repeater share the same collision domain.

Transparent to network protocols and does not interpret data.

Hub:

Operates at the physical layer (Layer 1) of the network.

Multi-port device that broadcasts incoming data to all connected devices.

Creates a single collision domain, causing devices to contend for network bandwidth.

Lacks intelligent traffic management and filtering capabilities.

Limited in terms of network performance and scalability due to shared bandwidth

2. Difference between a Bridge and a Router:

Bridge:

Operates at the data link layer (Layer 2) of the network.

Connects and joins separate network segments or LANs to form a single logical network.

Forwards data packets based on MAC addresses.

Builds and maintains a table (MAC table) of MAC addresses and associated network interfaces.

Bridges are commonly used to reduce network congestion and improve performance within smaller networks.

Does not perform IP address-based routing.

Router:

Operates at the network layer (Layer 3) of the network.

Connects multiple networks and routes data packets between them based on IP addresses.

Determines the best path for packet delivery using routing tables and protocols (e.g., RIP, OSPF, BGP).

Performs network address translation (NAT) and offers features like firewall and network traffic management.

Enables communication between networks with different IP address schemes.

To learn more on Bridge and Router click here:

https://brainly.com/question/13486343

#SPJ4

This is a python program.

I managed to get this program to say hello to a user after they input their first and last name, however, I cannot manage to get the program to tell the user how many letters are in the user's name.

Answers

Answer:

word = input("Type your name: ")

print(len(word))

Explanation:

The len function will count all the chars in the string.

Type the correct answer in the box. Spell all words correctly.
Natasha came across a website that had a building image, where each window in the building was clickable. She clicked on one of the windows,
Upon clicking the link information was sent to another computer. This computer processed the information and returned the appropriate page
about a window. Which attribute is used in this case to identify the type of image map?
The
attribute is used in this case to identify the type of image map.

Answers

Answer:

Redirection

Explanation:

This is something called redirection, you can sometimes get paid for it, or just some sort of reward, sometimes even a virus scanner.

Answer:

The  ismap  attribute is used in this case to identify the type of image map.

Explanation:

Using ismap indicates to your browser that the link is processed by another computer (server). Once the server processes the information about the link, it returns the appropriate page.

Phillip is using an optical device to look at the stars. He knows that it uses mirrors, but cannot remember its name. He is using a ......

refracting telescope
reflecting telescope
refracting microscope
reflecting microscope

EXPLAIN WHY YOU CHOOSE THAT ANSWER​

Answers

Answer:

He is using a REFLECTING TELESCOPE.

Explanation:

A telescope is an optical instrument that is used by scientists or astronomers to view objects that are very faraway such as objects that are in space. For example: the galaxies, the stars, the moon, the planet e.t.c.

The mode of operation of a telescope is, a telescope makes use of either a lens or mirrors which are curved. This lens or mirrors focus the light rays from the faraway objects and uses them to form an image.

We have two types of telescopes.

a. Refracting Telescope: Another name for a refracting telescope is a refractor. The refracting telescope uses a lens to focus the rays of light and form an image.

b. Reflecting telescope: This is also called a reflector. It is different from the refracting telescope because it makes use of curved mirrors to focus the rays of light and form an image. The images formed by reflecting telescopes are very big and clear. Those images are also free from any form of abberation such as chromatic abberation.

From the above question, Phillip is using an optical device to look at the stars. He knows that it uses mirrors, but cannot remember its name. He is using a REFLECTING TELESCOPE. The reason for my answer is because it is said in the question that the optical device makes use of mirrors and it is only a reflecting telescope that uses mirrors.

Other Questions
Evalute the factors that contributed to the rise of totalitarianism between ww1 and wwll client is using the Sales on Account workflow. Instead of receiving a payment against the invoice, they add a new deposit categorized to an income account. A line intersects the points (-8,-1) and (1,8). What is the slope-intercept equation for this line? Marijuana has been legalized in several states. Some people believe this has resulted in an increase of impaired drivers on the road and that traffic fatalities have increased as a result. While some drug tests taken at the scene of accidents do indicate the presence of marijuana, such tests only reveal that the drug has been usedthey do not indicate actual intoxication, as indicators of marijuana use can stay in the system for days or even weeks after actual use. This is unlike alcohol, where a roadside test is a clear indicator in most cases of intoxication. What are some likely ethical issues arising from such testing? If people are using marijuana for medical reasons, they will most likely test positive for the drugs presence all the time, yet they will need to be able to drive. How can a "legal limit" be reasonably set if intoxication is not measured by current tests? 9. Fill in the table below with the correct slopes:If a line has a slope ofWhat is the parallel line slope? What is the perpendicular lineslope?632 Twenty-seven minus 2 of a number () is not more than 36. What is the number?A. x > 42B. X2-6OC. X Idk if my answer were right. I need clarification A sector with a radius of 6 cm has a central angle measure of 4pi/9 in radians. What is the area of the sector? For every pound a company spends on advertising, it spends 0.59 on its website. Express theamount spent on advertising to its website as a ratio in its simplest form. A copy machine makes 32 copies per minute.how many copies does it make in 5 minutes and 15 seconds If the adenine in the 15th position of the sequence is changed to a guanine, the person does not have CF. However, if the thymine in the 14th position is changed to a cytosine the person does have CF. What are some reasons this might occur? Nina skated for 2 hour 14 mins she stopped at 8:24 what time did she start skating Can anyone plz help me Nutrients from digested food move front the digestive system directly to the -A. Circulatory system B. Integumentary system C. Excrectory system D. Endocrine system A,B,C or D which of the following can be concluded regarding the movement represented in the graph? -13=-18+w/4 two step equation The flow of electric charges through a material describes an electric _______. A. voltage B. resistance C. inductance D. current In order to write a good essay should u use trasition words yes or no This statement about Auschwitz is True False: Cyanide gas was used to fuel the ovens in the crematoriums. 3. In this new government, what three newfreedoms were Germans granted?