PLZ HELP!!! I'm a beginner in coding!

BTW, I'm a beginner in coding, so you don't have to get all fancy and stuff lol. Plz keep it "beginner's level" haha thx

1. Randomly choose rock, paper, or scissors for the computer
2. Ask the user to choose rock, paper, or scissors
3. Compare the computer’s choice to the player’s choice
4. Announce whether the computer or the human won

BUT!!! I already did 1, 2, and 3. I just need help with 4, how do I announce whether the computer or the human won? Am I suppose to use an if, elif, or else statement? Or a loop maybe? Please help! Thank you! Also, plz keep it simple, I just started learning coding

Answers

Answer 1

import random

rock,paper,scissors = 1,2,3

choice = int(input("Please choose 1 2 or 3: "))

computer = random.randint(1,3)

player_won = False

draw = False

if choice == computer:

   draw = True

elif choice == 1 and computer == 3:

   player_won = True

elif choice == 2 and computer == 1:

   player_won = True

elif choice == 3 and computer == 2:

   player_won = True

if player_won:

   print("You won!")

elif not player_won and not draw:

   print("The computer won!")

else:

   print("It's a draw!")

First, I recommend importing at the beginning of your program. Also, you can combine all your same datatype variables in one line. You also need to cast your user choice to an integer so you can compare it with the computer's choice. I wrote the if, elif, and else statements using a boolean variable. I simply wrote all the possibilities that would result in the player winning and this would result in the player_won variable being true. If this is the case, we print to the console, "You won!"


Related Questions

2. Identify two real-world examples of problems whose solutions do not scale well.

Answers

Answer:

The specification is defined downwards according to the conclusions reached.

Explanation:

Real-world instances or examples of issues that do not scale well are listed following table:

For different uses, such as solving the equation, respectively., multiplication matrices. It still does not scales or works well to organize a wide sequence of names or numbers as the requisite measures raise as squares by around the enlargement or increment.

How do use a search engine?

Answers

Answer:

You choose your search engine then you click the search bar and type what you want to know enter it and then click a website to visit

Explanation:

Select the correct answer.
What is the coding process commonly also called?
A. testing
B. development
C. debugging
D. refining

Answers

Answer:

B.

Explanation:

Answer:

development

is the correct answer

make an internet research on different hazards and risk​

Answers

Answer:

As internet use is extending to younger children, there is an increasing need for research focus on the risks young users are experiencing, as well as the opportunities, and how they should cope. With expert contributions from diverse disciplines and a uniquely cross-national breadth, this timely book examines the prospect of enhanced opportunities for learning, creativity and communication set against the fear of cyberbullying, p*rnography and invaded privacy by both strangers and peers. Based on an impressive in-depth survey of 25,000 children carried out by the EU Kids Online network, it offers wholly new findings that extend previous research and counter both the optimistic and the pessimistic hype. It argues that, in the main, children are gaining the digital skills, coping strategies and social support they need to navigate this fast-changing terrain. But it also identifies the struggles they encounter, pinpointing those for whom harm can follow from risky online encounters. Each chapter presents new findings and analyses to inform both researchers and students in the social sciences and policy makers in government, industry or child welfare who are working to enhance children's digital experiences.

Hazard is something with the opportunities to be harmful and the risk refers to the extent to which harm is likely to occur.

Many incidents are completely preventable, as well as the approach to doing just that would be to eliminate all potential dangers. Some objects are dangerous by nature, although some may be dangerous if handled wrongly as well as irresponsibly.

There are two kinds of hazards, such as:

Acute Hazard Chronic Hazard

The risk seems to be a fusion of various factors:

The actual likelihood that somehow a hazard might inflict damage.The severity of just that impairment.

Learn more about hazards here:

https://brainly.com/question/13084967

Choose the correct term to complete the sentence.

______play(s) an essential role in calculating, gathering, and storing information in
the workplace

1.) breaches
2.) technology
3.) training

Answers

Answer:

3.) Technology

Explanation:

Technology is pretty epic, my dude.

(it's a fill in the blank)
____ provide the means for other professions to perform their jobs more efficiently and effectively.

Answers

Please provide the means for other professions to perform their jobs more efficiently and effectively.

Answer:

programmers

Explanation:

das what it js

Evidence that a source is authoritative includes a. An email address to ask further questions about information in the source c. No verbiage used which could identify bias about the information provided b. A date regarding when the source was written d. Logical structure of the information provided so that it is easily read and understood Please select the best answer from the choices provided A B C D

Answers

Answer:

i belive   it iz      C

Explanation:

o

Answer:

The correct answer is A

Explanation:

Consider the following code:
val = 0
while (val < 10):
val = val - 1
print (val)
What is the error?

Answers

Answer:

The code will get stuck in an infinite loop.

Explanation:

Since val is decreasing by 1 each time it meets the criteria of being smaller than 10, your code will get stuck in an infinite loop since val will always be smaller than 10.

Hope this helps :)

1.Anong uri ng application software ang iyong ginamit upang makapagtutuos ka ng datos?

2.Mahalaga ba na matutunan mo ang ganitong kasanayan sa pagtutuos o pagkalkyula ng mga datos gamit ang spreadsheet software sa computer?

Answers

Answer:

The answer is "Microsoft Excel"

Explanation:

Please find the complete and correct question in the attached file.

It will use Microsoft Excel to calculate formulas may be put throughout every cell. Excel works for use of the readily accessible or available on-line resources.  

It can be linked to multiple files, servers, and information sources. It can also create a factory reset to allow Excel to process a data box folder, that's why it's important to learn to quantify of it's skill.

Will give BRAINEST if it's a very good answer
I keep asking for a phone and making reasons why i should have a phone, but if there's an emergency like kidnapping ima need to have a phone. but my parents say the first thing the'll do is take it away from you. What do i say to that response bc i rlly want a phone

Answers

Answer:

you have to try making them understand how important is your phone

I'll give brainlyist
Identify data types
13.5
-6
“18 Mingle Lane”
False
-20.4
“Bonjour”
12345

Answers

Answer:

1. Float

2. Integer

3. String

4. Boolean

5. Float

6. String

7. Integer

Explanation:

To identify data types, we need to understand the following concepts.

Data types are categorised into 2.

1. Numeric data types

2. Non numeric data types

The numeric data types are represented by numbers and is subdivided into 2.

i. Integer: Numbers without decimals (could be positive or negative)

ii. Float or Real: Numbers with decimals (could also be positive or negative)

Going by the above illustration,

13.5 and -20.4 are float data types

-6 and 12345 are integer

2. Non numeric data types: These are data that are different from numbers or digits. They could be images, string & character, boolean, dates, etc.

I'll limit my explanation to the scope of this assignment.

String are texts and are denoted by open and close quotes ("...") i.e. data that are present with quotes are strings

Boolean are data with true or false values

So, by this explanation:

"18 Mingle Lane" and "Bonjour" are strings variables

And

False is boolean

Answer:

Float, Integer, String, Boolean, Float, String, Integer.  

Explanation:

If you have different movie or audio file types saved to your computer and your computer can only play the OGG format instead of the MP4 video format, what should you do?

Answers

Answer:

convert the MP4 format file to the OGG format file                  

Explanation:        

An OGG file is a compressed audio file of Ogg Vorbis that is used for holding audio data. It is a free and an open container file format which is maintained by Xiph.Org Foundation. OGG format file can multiplex independent streams of video, text, audio and meta data.

The OGG file has better sound quality and characteristics than a MP3 or MP4 files. The MP4 file format can be converted into OGG format file if the files are saved in different formats in the computer which can play only OGG format.

why is this statement false: "when choosing the color of your font and your template background color, it is best to make them close in tone and hue"?

Answers

Answer:

A

Explanation:

Just a very strong guess

Your company emphasizes the important of conserving (not wasting)
resources. How can you support that value when you print an 8-page report
you were asked to bring to your department's monthly meeting?
A. Use the Save option to choose a format readers can open.
B. Post the report online before printing it.
C. Use the Print option to create extra copies.
D. Use the Print option for two-sided printing.
SUBMIT

Answers

Answer:

D. Use the Print option for two-sided printing.

Explanation:

ape x

Answer:

D

Explanation:

Fill in the blank
A file can be saved with a different file name than it currently has by clicking on Save____ in the File tab.

Answers

Explanation:

save as because if u want to save the bame of it press save as to save it as what u want

Answer:

save as

Explanation:

if you're gonna save it over writing a different one save as is the answer

Which of the following audio file formats will provide the best audio streaming on the Internet?

Answers

Answer:

MP3

Explanation:

MP3 and . MP4 are the best audio file formats for use on the Web. All modern browsers support this format, including IE9. Other formats that are supported by most browsers include OGG, WebM, AAC, and WAV

Answer:

MP3

Explanation:

Edge 2021

Joseph is a digital media developer and has years of work experience. He now wants to improve his management skills. What can he do to develop and sharpen his managerial skills? To improve his managerial skills, Joseph can enroll in a degree program.

Answers

Answer:

Following are the solution to this question:

Explanation:

Soft skills are best developed for irrespective of the occupation technical skills is a common skill, which everyone requires to master to work together and carry mostly on work successfully. A technically gifted individual needs soft skills to work with each other to the concept of work, to resolve issues, etc. The different soft training programs for different roles and decades of expertise are offered. therefore Professors propose learning in soft skills as well as an MBA degree.

why was the tesla model s help change the was we see EV

Answers

Answer:

It showed people that electric cars are advancing, and soon will be the norm.

Lots of people thought that EV cars would never be able to last as long as gas powered cars. However, with technology importing, Tesla cars are getting closer and closer to being able to provide the same amount of millage as the gas powered cars.

Kyle returns to work the next day and he would like to continue working on the document from yesterday. What should Kyle do?


Double-click on the Start menu.

Look for his open document in the system tray.

Locate his file and click twice on it.

Locate his file, right click, and select Print.

Answers

Answer:

Locate his file and click twice on it.

What connections do you see between variables and what you learned about the Input-Output-Store-Process model of a computer?

Answers

Answer:

h

Explanation:

Which of the following is an open-source web browser?
O Firefox
O Internet Explorer
O Opera
O Telnet

Answers

Answer:

Firefox

Explanation:

Not much to explain.

Firefox is the only open-sourced web browser here.

Day 1 of seeing if anyone will buy me a psn gift card (if u do u get brainliest and thanks + alot of points

Answers

today is not the day keep trying

30 points! Help me out, please! I need help with this!

Answers

Answer:

Both are touchscreen.

Tablets are seen more as an entertainment device (tv, games, etc.).

Phones are smaller, and used more for everything; you can take phones anywhere you go, whereas tablets are more difficult to transport.

List 5 applications for working with text

Answers

Answer:

TTSReader, Go2PDF, Free File Merge, Batch Text File Editor

Explanation:

3. When a small business buys office supplies online, it is an example of business-to- business e-commerce.
a. True
b. False​

Answers

Answer:

TRUE

Explanation:

Answer:

TRUE i think

Explanation: For example, an automobile manufacturer makes several B2B transactions such as buying tires, glass for windscreens, and rubber hoses for its vehicles. The final transaction, a finished vehicle sold to the consumer, is a single B2C transaction.

Write a section of code that asks the user for their last name and then will create A new string produced by randomly splitting their name into two parts and reversing their order.
Example: "computer" may produce the result "utter comp".

Answers

import random

name = input("Enter your last name: ")

w = random.randint(0,len(name)-1)

txt = name[0:w]

txt1 = name[w:]

print(txt1+" "+txt)

I hope this helps!

the full forms
MU
memory unit
CU
control unit​

Answers

Answer:

u asking or saying ? ?????

HELP! Finish identifying the data types of each of the following pieces of data:

Answers

Answer:

Double

Int

Char

Boolean

Int

String

Byte if that is an array or Int

Answer:

Line 1: String

Line 2: Float

Line 3: Integer

Line 4: String

Line 5: Boolean

Line 6: Float

Line 7 String

Line 8: Integer

Explanation:

MS Coding 1 A - E d g e n u i t y 2021 March 17

Answerer's Note:

I hope this helped!

-- Juri Davis

what are output devices ?
name them​

Answers

Answer:

Monitor.

Printer.

Headphones.

Computer Speakers.

Projector.

GPS.

Sound Card.

Video Card.

Explanation:

explain what led to the invention of lasers

Answers

Answer:

The laser is an outgrowth of a suggestion made by Albert Einstein in 1916 that under the proper circumstances atoms could release excess energy as light—either spontaneously or when stimulated by light.

Explanation:

The laser is an outgrowth of a suggestion made by Albert Einstein in 1916 that under the proper circumstances atoms could release excess energy as light—either spontaneously or when stimulated by light. German physicist Rudolf Walther Ladenburg first observed stimulated emission in 1928, although at the time it seemed to have no practical use.

In 1951 Charles H. Townes, then at Columbia University in New York City, thought of a way to generate stimulated emission at microwave frequencies. At the end of 1953, he demonstrated a working device that focused “excited” (see below Energy levels and stimulated emissions) ammonia molecules in a resonant microwave cavity, where they emitted a pure microwave frequency. Townes named the device a maser, for “microwave amplification by the stimulated emission of radiation.” Aleksandr Mikhaylovich Prokhorov and Nikolay Gennadiyevich Basov of the P.N. Lebedev Physical Institute in Moscow independently described the theory of maser operation. For their work all three shared the 1964 Nobel Prize for Physics.

An intense burst of maser research followed in the mid-1950s, but masers found only a limited range of applications as low-noise microwave amplifiers and atomic clocks. In 1957 Townes proposed to his brother-in-law and former postdoctoral student at Columbia University, Arthur L. Schawlow (then at Bell Laboratories), that they try to extend maser action to the much shorter wavelengths of infrared or visible light. Townes also had discussions with a graduate student at Columbia University, Gordon Gould, who quickly developed his own laser ideas. Townes and Schawlow published their ideas for an “optical maser” in a seminal paper in the December 15, 1958, issue of Physical Review. Meanwhile, Gould coined the word laser and wrote a patent application. Whether Townes or Gould should be credited as the “inventor” of the laser thus became a matter of intense debate and led to years of litigation. Eventually, Gould received a series of four patents starting in 1977 that earned him millions of dollars in royalties.

The Townes-Schawlow proposal led several groups to try building a laser. The Gould proposal became the basis of a classified military contract. Success came first to Theodore H. Maiman, who took a different approach at Hughes Research Laboratories in Malibu, California. He fired bright pulses from a photographer’s flash lamp to excite chromium atoms in a crystal of synthetic ruby, a material he chose because he had studied carefully how it absorbed and emitted light and calculated that it should work as a laser. On May 16, 1960, he produced red pulses from a ruby rod about the size of a fingertip. In December 1960 Ali Javan, William Bennett, Jr., and Donald Herriott at Bell Labs built the first gas laser, which generated a continuous infrared beam from a mixture of helium and neon. In 1962 Robert N. Hall and coworkers at the General Electric Research and Development Center in Schenectady, New York, made the first semiconductor laser.

While lasers quickly caught the public imagination, perhaps for their similarity to the “heat rays” of science fiction, practical applications took years to develop. A young physicist named Irnee D’Haenens, while working with Maiman on the ruby laser, joked that the device was “a solution looking for a problem,” and the line lingered in the laser community for many years. Townes and Schawlow had expected laser beams to be used in basic research and to send signals through air or space. Gould envisioned more powerful beams capable of cutting and drilling many materials. A key early success came in late 1963 when two researchers at the University of Michigan, Emmett Leith and Juris Upatnieks, used lasers to make the first three-dimensional holograms (see holography).

Helium-neon lasers were the first lasers with broad commercial applications. Because they could be adjusted to generate a visible red beam instead of an infrared beam, they found immediate use projecting straight lines for alignment, surveying, construction, and irrigation. Soon eye surgeons were using pulses from ruby lasers to weld detached retinas back in place without cutting into the eye. The first large-scale application for lasers was the laser scanner for automated checkout in supermarkets, which was developed in the mid-1970s and became common a few years later. Compact disc audio players and laser printers for personal computers soon followed.

Other Questions
Create a program that draws a rectangle whenever you click the mouse. The rectangle should have a width of 30 and a height of 50 and be centered at the place where the user clicks. Remember, the position of a rectangle is the top left corner. To place the rectangle at the center of the click, you will need to adjust the position. Can anyone answer this plz? Chanelle deposits $7,500 into the bank. She does not withdraw or deposit money for 6 years. She earns 6% interest during that time. a. How much interest will she have earned at the end of 6 years? Send your answers I will check if it is correct The League of Nations was created after the Paris peace conference,at which the treaty of Versailles had been negotiated. What was one of the primary aims of the League of Nations? a music teacher gathered data from several clarinet players about the time they spent practicing their instruments and the number of errors they made on a performance assessment. the data and the line of the best fit are shown in the scatter plot PLEASE HELP ME WITH THIS QUESTION What do lines 26-29 reveal about humans in the song for the turtles in the gulf poem? how is cheese made and where where did the pepper and spices that were traded in the mediterranean sea complex come from 1. Which of the following statements describe cations? Select all that apply.Positively charged ions.Negatively charged ions.They have lost electrons.They have gained electrons. Which is a benefit of the rule of law?Group of answer choicesGovernment officials can act on their own instincts in emergencies.There is less government paperwork.Citizens are protected from oppressive uses of government power.Government leaders are given special treatment regarding what laws they must follow. A loan commitment of $4.43 million with an up-front fee of 60 basis points and a back-end fee of 35 basis points. The take-down on the loan is 40 percent. Calculate the total fees you will pay on this loan commitment. Tessa bought stock in a restaurant for $160.00. Her stock is now worth $224.00. What is the percentage increase in the value of Tessa's stock? Which of the following statements is true regarding the movement of substances across cell membranes?Alons are unable to move through the phospholipid bilayer because the nonpolar tail regions of the phospholipids are hydrophobic.Blons are able to move through the phospholipid bilayer because the polar head regions of the phospholipids are charged.Water is able to move through the phospholipid bilayer because the nonpolar tail regions of the phospholipids are charged.DWater is unable to move through the phospholipid bilayer because the polar head regions of the phospholipids are charged, On page 21, Jonathan says he doesnt realize the other soldiers would be nervous. Why not? fighting ground if f(x)=4x+3 and g(x)=x^2-3 then f(g(2)) What conclusion about the influence of the yellow and Yangtze River does the passage best supportThey limit the expansion of Chinese cultureThey encourage the growth of the Chinese civilizationThey made the people of ancient China Japan and riceThey prevented the development of economy activities other than farming 2 of 6Given that a = 12 cm and b = 17 cm, work out the area of the triangle.Give your answer rounded to 1 DP. in coin on card experiment a smooth card is used