Pick a number
You will write a program that will simulate the game where two players try to guess a number and the one who's closest wins.
1. Random secret number from 1 to 10 or any larger range if you want.
2. Two players will guess
3. Determine who was closest.
4. Display the results of the round in a neat and organized fashion.
5. Add some kind of style to your print outs so that your display is nice

Answers

Answer 1

In python 3+:

import random

secret_number = random.randint(1,10)

guess_one = int(input("Enter player one's guess: "))

guess_two = int(input("Enter player two's guess: "))

if abs(guess_one - secret_number) < abs(guess_two - secret_number):

   print(f"The secret number is {secret_number} and player 1 was closest")

elif abs(guess_one - secret_number) > abs(guess_two - secret_number):

   print(f"The secret number is {secret_number} and player 2 was closest")

else:

   print(f"The secret number is {secret_number} and it was a tie")

I hope this helps!


Related Questions

Dave is a website administrator and manages several websites and a couple of blogs. One of his primary concerns is secure data transfer. Which telecommunication component can help Dave and other users to encrypt data?

Answers

Answer: C:Control Software

Explanation: The test said so

5. Choose the correct options:
a. Each bead in the heaven of Abacus has .... value
i) One
ii) Three
iii) Five
iv) None of the above​

Answers

Answer:

in my opinion the answer is number 2 three opinion the answer is correct then mark me as brain list

Which of the following is not expected of employees’ oral communication skills in the workspace

Answers

Answer:

Yes, choose C since it's not an oral requirement, but a written one.

The oral communication skills in the workspace should not involve writing.

The information regarding oral communication skills is as follows:

Active listener.Clarification.Asking open-ended questions.In this, the communication could be done in a clear way.The appropriate language should be used.Also, the laws & regulations should be communicated.

Therefore we can conclude that the oral communication skills in the workspace should not involve writing.

Learn more about the communication here: brainly.com/question/12349431

In a paragraph of 125 words, describe the benefits of having an electronic résumé.

Answers

Answer:

Employers benefit from the advantages online resumes offer, including having access to a host of possible applicants based on specific search criteria and limiting their search to applications that possess the exact skills and qualities they are looking for.

Answer:

There are numerous advantages to creating an online resume. Companies themselves are increasing their use of online services because they offer significant cost savings over traditional hiring methods. As such, many industries and government organizations will now specifically ask job seekers to post their resumes online in a specific format (e.g., MS Word, HTML, or PDF), either by uploading them from another location or recreating them on their website.

     However, the main advantage of online resumes is that they are instant; sending a resume through the mail is likely to take days, and if a company needs to hire someone fast, or are looking for temporary or freelance work, they're unlikely to go to the trouble to post an advertisement, wait for resumes to arrive, and then sort through them.

     Companies will instead be looking for a speedy solution, and having an online resume immediately opens up these avenues to you.

     Keeping your resume online also allows you to instantly update your resume with your most recent achievements, even notifying potential employers of this update if they are considering your resume.

Explanation:

Here are a few elements of breaking news and a feature story. Match the elements of breaking news and a feature story with their correct images.

Answers

Breaking News:

➡️Highlights key events

➡️Answers some, but not necessarily all questions, such as when, where, who, why, and how.

Feature Story:

➡️ No urgency to be reported

➡️Adequate time for research

➡️Includes reviews and Q&A type interviews

➡️Summary lead is the most traditional form often used to create a script

Explanation:

Breaking news is known as a special report or news which reports something current and urgent. It usually interrupts a scheduled program or current news. It answers some questions on the news that just broke out.

Feature story is known to be a news that is non-fiction. It is also known to be a type of soft news. It includes Q&A interviews and reviews. It takes adequate time for research.

Breaking News

Highlights Key eventsIncludes Reviews and Q&A type interviewsAdequate time for research

Feature story

Answers some , but not necessarily all questions , such as when , where , who , why , and howNo urgency to be reportedSummary lead is the most traditional form often used to create a script.

Suppose you have a word processing application on your smartphone, your tablet, and your laptop. You are at home, and you need to write a paper for a class. A would be easiest to use for writing your paper.

Answers

Answer:

laptop

Explanation:

have a good day

Within a major students can choose to study a specific area within major. For example a journalism student may study military journalism or business journalism the specific area is called

Answers

Answer:

Specialization

Hope this helps!

Answer:

Specialization

Explanation:

QUESTION 2 / 10
Which of the following is the BEST rearn to use cash for making purchases
B. Getting more cash from an ATM machine is easy to do
A. Splitting bills with friends is entier,
D. Knowing what you have spent your money on is
simple,
C. Keeping track of how much you have spent is simple.
Achete Wing
Go to Semings to

Answers

Answer:

C. Keeping track of how much you have spent is simple.

Explanation:

One of the best reasons to use cash for purchases is to help one track how much he/she spends. When one uses cash for purchases, it helps to keep him/her in check on how much he/she spends daily.

This helps individuals to cut down, control and watch over their spendings. Actually, when you see the cash you own, it can remind you to spend less because your overall money with you is in reality.



Access from and output to the register is slow true false​

Answers

Answer:

false

Explanation:

it depends most of time so false

concept about borderless classroom because of technology​

Answers

Answer:

With Borderless Classroom Technology, every student remains a part of the classroom. ... That is to be 'as simple as a light switch' and as effective in lighting the learning experience as educators focused on students, not on technology." Borderless Classroom Technology is an extension of that philosophy.

HAS TO BE RIGHT- GOOGLE TOLD ME

By providing education increasingly interesting as well as collaborative, technologies can indeed benefit pupils. A further explanation is provided below.

Borderless Classroom means allowing the instructor to communicate individual screen among students, learners are encouraged from whatever place to take part throughout the lesson, gives educators and administrators with individual conversation skills, improved administration in classrooms.Enables the instructor to watch what pupils were doing on their dashboards gadgets instantaneously.

Learn more about borderless classrooms here:

https://brainly.com/question/7526791

I will brainlist

LEAN manufacturing is mostly used in automobile
manufacturing?

True or False

Answers

Answer:

True

Explanation:

Answer:true

Explanation:

Having a positive work ethic means accepting
constructive criticism even though it may be
painful. You should: (select all that apply)
show a positive facial expression.
maintain eye contact
not interrupt or speak until you are sure the
other person is finished making a point
question the person frequently throughout the
conversation

Answers

Answer:

2 and 3 (1 is debatable)

Explanation:

Answer:

123 and the next one is all of them

Explanation:

Jonathan works with a team of graphic designers. They have a collection of images and have divided the image editing work among them. They have their individual computers to work with. Jonathan suggests that the storage device for sharing their work should be of the plug-and-play type. Which storage device is he talking about?
A.
USB drive
B.
CF card
C.
SD card
D.
MMC

Answers

Answer:

A, USB

Explanation:

In Word, tables can be styled much like text can.
True
False

Answers

Answer:

True

Explanation:

There are many formatting options from color, size, and many more.

Hope this helps!

A database record can best be described as:
А
a collection of data about a limited topic, organized into rows and columns.
B
a collection of data that can be sorted and searched using search algorithms.
С
a category of information in a table.
D
a collection of information consisting of one or more related fields about a specific entity.

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

The correct option to this question is D.

A database record can be best described as the collection of information consisting of one or more related fields about a specific entity. Because a database record represents a record about a specific entity for example a student record studying in a school. A student is a specific entity in the database and it has one or more related fields, for example, name, class, courses in which enrolled etc.

others options are not correct because:

A: a database record is a collection of data about a specific entity and it is not about a limited topic.

B: all database records can be sorted and searched using search algorithms but it is not necessarily because you can search data sometimes using quarries etc.

C: a database record is not a category of information in a table but it is a collection of one or more related field about a specific entity.

Answer:

c

Explanation:

Software as a Service refers to

software that you put on your computer.

software you can access using any device.

a server.

a web browser.

Answers

Answer:a,b,d,e

Explanation: The other top ones are right but it's a multiple choice answer

Hi! I'll mark brainliest if you can help me with my problem!
What do I do if I have a computer stuck in a automatic repair loop/boot loop? Please help asap

Answers

Answer:

1. Click Repair your computer at the bottom.

2. Choose Troubleshoot>Advanced Options>Command Prompt.

3. Type chkdsk /f /r C: and then press Enter.

4. Type exit and press Enter.

5. Restart your PC to see if the problem is fixed or not.

Answer:

So first you would try shutting it off or restarting it then if it doesn't work press automatic restart.

Explanation:

If this doesn't help contact a person at best buy wor whatever. Im sorry if this sounds rude in anyway. :(

WILL GIVE BRAINLIEST FOR CORRECT ANSWER

Which prototyping tool has a feature to turn your paper sketches into mockups?
A.
Justinmind
B.
Marvel
C.
Origami
D.
InVision

Answers

Answer: origami studio

What file format is used to help prevent other people from editing a final document?
RTF
TXT
PDF
PWP

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is PDF.

Because PDF file format does not allow you to edit something in it. It prevenst others from editing in it. In a PDF file, you cannot add text, pictures, etc as like in a word document.

Why other options are not correct.

In RTF (rich text format) and TXT file format, you can easily edit the content in these file formats. Furthermore, RWP  files are the storage of the contents of these RapidWeaver websites. All the website contents are saved using this format that includes information about images, pages and style sheets, etc, and information in it can be easily editable.

the hardware device that allows the user to see the results after processing is the monitor,scanner,webcam,Camara​

Answers

Answer:hey

Explanation:

A device is one that is an external device and includes Printer, monitor, keyboard, and scanner. The input device includes the mouse and other point devices.

The camera is also an input device, a web-cam is a external device. The external device that lets the user see the output or the result on the screen is monitor.

Hence the option A is correct.

Learn more about the device that allows the user to see the results.

brainly.com/question/25756373.

HELP PLEASE!!!!!!!!
IT Professionals may implement a(n) questionable sites. Choose the answer to prevent users from visiting

A firewall
B spam filter
C anti-virus software
D content filter​

Answers

Answer:

the answer is D. Content filter

An IT Professional may implement a content filter to protect the user from sites that seem questionable. (Mainly being offensive, inappropriate, and even dangerous for the user.)

I hope my answer came in handy! <3

A family member who hasnít worked with computers before has decided to change jobs. Youíve been asked to explain some of the basics. You begin by explaining the basic idea of word processing software, spreadsheets, databases, and presentation software. You sense that the following question is coming: ìWhy so many different things? Why canít there just be one software that you could use for everything?î How would you answer?

Answers

There are too many diverse forms of media. For all of them to be suited under one program would make every server monotonous and pretty much the same. With different programs, different forms of diverse media are created.

What is Hypertext Transfer Protocol?

Answers

Answer:

an application layer protocol for distributed, collaborative, hypermedia information systems.

Explanation:

I need help plz
so right now im on my school computer and everytime i turn it on it shows this blue site and on the site it says something like anti-virus-protection. I dont need virus protection cause im on my school computer, then whenever i turn on chrome it closes the page i was on and then brings it bk on does anyone know what is happening or can help me???


ALSO ALL my extension that are not to help me with school are deleted

Answers

Answer:

Try to restart your computer, if it doesn't work try looking up what to if anti-virus protection comes up randomly, without needing it.

Explanation:

Not Sure if you'll still get it even after restarting, but if it doesn't then hard shutdown the computer, So it could refresh it.

try turning it off and back on or u can wait till the battery drains out

Which of the following devices can send or receive
information on a network? Check all of the boxes
that apply.
O printers
e-book readers
clients
servers
smartphones

Answers

Answer:

All

Explanation:

Answer:

Its all  of them

Explanation:

I got it right

I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
select all that apply
The purpose of special effects in presentations is to _____.

improve their effectiveness
showcase the presenter's creativity
increase audience attention
focus audience attention
make boring presentations interesting
provide visual cues

Answers

Answer:

1,2,3,4,5

Explanation:

Answer:

improve their effectiveness

showcase the presenter's creativity

increase audience attention

make boring presentations interesting

provide visual cues

Explanation:

Which of these file formats would you choose if you had to create a vector graphic?
Graphic Interchange Format (gif)

Portable Network Graphic (png)

Adobe Illustrator (ai)

Microsoft PowerPoint (pptx)

Answers

Answer:

Don't know, but it's NOT (pptx)

Maybe you will have better luck than me Edge2020

The file format that one would choose if you had to create a vector graphic is Adobe Illustrator.

What is Adobe Illustrator?

This is known to be a kind of Software that helps in editing of vector graphics and it is also used in design program.

Based on the specification above, The file format that one would choose if you had to create a vector graphic is Adobe Illustrator as that is its work.

Learn more about Adobe Illustrator from

https://brainly.com/question/15169412

#SPJ2

Help ASAP!!Choose all the basic elements of algorithms. A.Selection B.Loops C.Flow Charts D.Sequencing E.Combinations F.Iteration

Answers

Answer:

b c d

Explanation:

Answer:

A, C, E, F

Explanation:

Just took the test

what is amoeba cell do? max amount of points so pls answer​

Answers

Answer:

Ameoba is an organism which is unicellular and is a free-living cell. it is also a eukaryotic organism ( it has well-defined, membrane-bound cell organelles).

An amoeba cell has to carry out all the functions needed for its survival such as injection of food, digestion of food, excretion of waste, etc

An Amoeba cell is a unicellular organism. It is eukaryotic and has well-defined, membrane-bound cell organelles. Amoebas function as their own living body, so they create energy, move around, and throw out waste on their own.

3) You can't name your report.
True or false?

Answers

Not sure if this is a legit question or not but no you probably shouldnt give your report a name lol

Other Questions
25 points! Please help!!! ASAP How did Nationalism among European nations contribute to Imperialism? A.) It created intense rivalries and competition for colonies.B.) It created a system of alliances for control of Asia. C.)It decreased the expansionist goals of Great Britain and Germany. A m me gusta dibujar porque soy _____________ earths_____ absorbs solar radiation and re-radiates it to earths surface What is 80 and x classified 6>>>>>>>(3 3 )4>>>>>>>( 1 2 )3>>>>>>>( 1 4 )5>>>>>>( 2 9 )1>>>>>>>( ? )7>>>>>>>( 5 4 )Who will solve the above puzzle ? Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.Basic Salary = 20001 : HRA = 30%, DA = 95%Your program must calculate each employee's gross pay amount. The center of an ice rink is located at (0, 0) on a coordinate system measured in meters. Susan is skating along a path that can be modeled by the equation y = 6x x2 5. Luke starts at (10, 21) and skates along a path that can be modeled by a quadratic function with a vertex at (8, 9). If the rink is a circle with a radius of 35 meters, which statement best interprets the solution(s) of a system of equations modeling the paths of the skaters?A. The skaters paths intersect once, but that point is outside the rink.B. The skaters paths intersect once, and that point is inside the rink.C. The skaters paths intersect twice, but only one of those points is inside the rink.D. The skaters paths intersect twice, and both points are inside the rink. Read the excerpt from an adaptation of "To Build a Fire.When he fell down a second time, the dog curled its tail over its forefeet and sat in front of him, facing him, curiously eager and intent. The warmth and security of the animal angered him, and he cursed it till it flattened down its ears appeasingly. This time the shivering came more quickly upon the man. He was losing in his battle with the frost.The dog is "eager and intent, while the man isresentful of the dogs natural protection.frustrated by the dogs disobedience.confused by the change in temperature.satisfied with his own survival skills. A Major League Baseball stadium sells three types of tickets. Reserved tickets are sold for $20 each, field-level tickets are sold for $50 each, and box seat tickets are sold for $100 each. You purchase 10 total tickets for $370. You have twice as many reserved tickets as field-level tickets. PLEASE HELP ASAP *TIMED TEST*What is the slope of the line represented by the equation y = 4/5x - 3?A: -3B: -4/5C: 4/5 D: 3 Rachel found the following rate of change for thescenario represented in this table.What can you conclude from her work?Check all that apply.The scenario is represented by a linear function,since the rate of change is constant.The scenario is represented by a nonlinear function,since the rate of change is constant.The berries are picked at a constant rate of 53 perhour.The berries are not picked at a constant rate. Please helpIf local citizens are unhappy with a locally elected official, they can conduct a recall election and "fire"or remove that person from office.O TrueFalseExample of voter apathy are voting in elections, volunteering for campaigns and working the electionpolls.O TrueFalse Paid the rent for the month,$650 What is the effect of temperature on ATP,NADPH, and sugars? Will the increase, decrease, or stay the same? Please help me immediately I will mark you as brainiest. helo! i was wondering if anyone could help me of these two questions for biology? describe the 4 steps of the nitrogen cycle :) Find three consecutive even integers whose sum is -42 A fish was swimming LaTeX: 2\frac{1}{2}2 1 2 feet below the water's surface at 1:00 p.M. Three hours later, the fish was at a depth that is LaTeX: 3\frac{1}{4}3 1 4feet below where it was at 1: 00 p.M. What rational number represents the position of the fish with respect to the water's surface at 4:00 p.M.? The Mesopotamians started settling near the two rivers, Euphrates and Tigris. Explain TWO reasons why they settled near the rivers and how this helped the development of their civilization. (Think about how and for what did they used these two rivers) *