A computer game picks a random number between 1 and 100, and asks the player to guess what the number is. If the player makes a correct guess, the game congratulates them, and stops. If the player does not make a correct guess, the game tells the player that their guess is either too high, or too low. If the player guesses with an answer that is not a number between 1 and 100, an error message is displayed. The game continues to give the player chances to guess, until the player guesses correctly. You are going to plan an interactive program to implement this game. do this using scratch

Answers

Answer 1

Answer:

In Python:

import random

computerguess = random.randint(1,101)

userguess = int(input("Take a guess: "))

while not (userguess == computerguess):

   if userguess<1 or userguess>100:

       print("Error")

   elif not (userguess == computerguess):

       if userguess < computerguess:

           print("Too small")

       else:

           print("Too large")

   userguess = int(input("Take a guess: "))

print("Congratulations")

Explanation:

This imports the random module

import random

Here, a random number is generated

computerguess = random.randint(1,101)

This prompts the user for a guess

userguess = int(input("Take a guess: "))

The following loop is repeated until the user guess correctly

while not (userguess == computerguess):

If user guess is not between 1 and 100 (inclusive)

   if userguess<1 or userguess>100:

This prints error

       print("Error")

If the user guessed is not correct

   elif not (userguess == computerguess):

If the user guess is less

       if userguess < computerguess:

It prints too small

           print("Too small")

If otherwise

       else:

It prints too large

           print("Too large")

This prompts the user for a guess

   userguess = int(input("Take a guess: "))

The loop ends here

This prints congratulations when the user guess correctly

print("Congratulations")


Related Questions

Text,Audio and graphic is entered into the computer using
a)A cpu
b)Output
C)Input
ICT Question​ asap pls help

Answers

Answer:

I think it's input, not sure tho

PLS HELP MEE!!!

Which characterization would accurately describe hump notation?


1. starting with uppercase letters, followed by the underscore and dollar sign


2. starting with lowercase letters, followed by an underscore, and followed by lowercase


3. starting with lowercase letters, using uppercase letters for the first letter in a new word


4. starting with a dollar sign, using lowercase for the remaining parts of each word

Answers

Answer:

starting with lowercase letters, using uppercase letters for the first letter in a new word

Explanation:

starting with a dollar sign, using lowercase for the remaining parts of each word

someone please tell me if you watch drag race (rupauls drag race) I need someone to talk to about it ​

Answers

I’m gonna watch it soon

Meat and poultry exposed to some forms of radiations to extend shelf life. *

Answers

Answer:

Food Irradation

Explanation:

:)

20 POINTS!!! I NEED HELPP

Answers

Answer:

Apple

Explanation:

Answer:

Windows Internet Explorer

because windows is aka microsoft windows

ANSWER ASAP!!!!!


Which statement best describes licensed characters?
A.
They are based on real-life characters from past periods in history.
B.
They are given human qualities, and star in games for young children.
C.
They are based on preexisting media.
D.
They are based on legend and folklore.
E.
They are characters specifically created for a game.

Answers

I think it’s A

Hope that helped :)

Answer:

my friend thinks its c

hes too smart to be wrong 100% :DDDD

Explanation:

During which phase of the writing process is it best to have other
people review your document
O Pre-writing
O Drafting
Revising
O Publishing

Answers

Answer:

the answer should be Revising

How do I calculate this square footage?

Answers

Answer:

To calculate it, you have to break it apart. Sorry for the bad writing but after you break it apart, you multiply the smaller squares. Then with all of the smaller areas, add them together for the final answer which in this case is 456.

Write a program using for loop to find the cube of numbers from 50-100
FASTT

Answers

Answer:

JAVA

for(int i = 50;  i <= 100          i++;)

{

   int cubedNum = Math.pow(i, 4);

   System.out.println(cubedNum);

}

Explanation:

The For loop is set so that it will go the amount of times until the variable i reaches 100, then it will stop increasing i.

Then, we raise i to the 4th power in the loop, and then print it out.

#teamtrees #PAW (Plant And Water)

Document accurately describes the differences between servers and computers and between local and wide area networks. Document provides at least four suggestions including password managers and safe browsers.

Thinks someone could help me out with this? ​

Answers

Answer:

Cell towers and internet uses allow local and wide area networks, but they also allow you to steal IP and things like that.

Explanation:

This is quite difficult. I appologize if I get this wrong.

(Also if you upload a file for someone to answer, and they give you a link, don't click on it!! They track your IP address and things like that!)

Charles was supposed to present his PowerPoint slides to his classmates in a classroom, but now he has to present in the auditorium in front of his entire grade. What change will Charles have to make when he presents his slides?

He will have to change his topic.
He will have to rearrange his slides.
He will have to speak more loudly and clearly.
He will have to tell his friends about the change.



HELP ASAP

Answers

Answer:

it is c

Explanation:

cus of the long and huge hall of u have in ur school

Answer: C

Explanation: Because he will need the whole grade to hear, or you know grab a mic :D HOPE YOU ENJOY YOUR DAY

int x = 42
fill in the missing part of the following code to divide x by 3 using the shorthand division operator ​

Answers

42/3 will be equal to 14

PlEASE HELP!

Identify in the space below three rules you feel are most important for deciding what personal information is
appropriate to post online.

Answers

Answer:

.

Names. Be careful how you use your name. Avoid using your full name. Even a nickname could spell trouble -- for instance, if it says something suggestive about your character, if it's a name you already use with others who know your real identity, or if it's made up from your real name (say, from your initials). First names are best, unless yours is extremely unusual. These days, many people do use their full names for online posting -- on social media sites and blogs for example. Just know that in doing so you're raising the risk of becoming an identity theft victim.

Photos. Bearing in mind Golden Rule #1, don't post photos you wouldn't want everyone to see. Full face, high resolution photos may be "snagged" (copied) and used for identity theft. Some people don't know how easy this is to do with any photo, with just a couple of clicks. Also, as a matter of etiquette, don't post photos of others without their permission, unless you're prepared for the consequences if the other person doesn't think it's funny. For preference, use photos in which identities are obscured. And, as a general rule, don't post photos of children online (especially not other people's children without permission). If you want to share photos of your kids, put them in a private online album, accessible by invitation or password. Or email them directly to your friends.

Explanation:

20 POINTSS!! NEED HELP!!

Answers

Answer: You can start a new browser instance for each window you want to open

Explanation: HOPE THIS HELPED!!

Answer:

laat one

Explanation:

Culinary Arts simply means the art of
(7 Letters)

Answers

Answer:

I believe it means C-o-o-k-i-n-g (7 letters)

Explanation:

Answer:

C-O-O-K-I-N-G

Explanation: I got this one correct pls mark as brainliest

how can online presence help others?

Answers

Answer:

Online Presence helps others who might be naturally introverted, stuck in a precarious situation, or even by allowing someone company who desperately needs it.

Explanation:

Which font is most suitable for an academic article on a website? Which is most suitable for casual information?
The
information.
font is most suitable for an academic article on a website. The
font is most suitable for casual

Answers

There are thousands of fonts, there is no clear answer of what is best for ___ website or ___ page. It's all what you think looks good and sometimes depends on the colors on the site.

Answer:

Times New Roman and Arial

Explanation:

plato

Many companies organize employees into work teams. The team meets to make plans, determine how work will be completed, and divide the work among the team members. The team is responsible for meeting objectives and may even have some say about their budget. Work teams still report to a manager and can ask for assistance when needed. True False

Answers

Answer:True


I think

Sorry if I was wrong

where can i make an animation for free?

Answers

Answer:

I've heard of flipabook and apparently that's good for simple animations

Explanation:

Hope that helped! Have a nice day!

How is life complicated without electronics

Answers

Answer:

life is complicated without electronics

Explanation:

because we wont know the weather or if anything  know anything about  and we would mostly not know anything

Bryan's company is new and has limited funds to work with. He has been tasked with finding a telecommunications technology that will improve worker productivity on their latest project. So he doesn't go over budget, he must carefully consider all items that affect cost. His considerations include:

Answers

Answer:

Download Speed, Operating Costs, & Purchase Price.

Explanation:

He needs it quick and he's on a budget, so he's gonna be worried about these three things that fall under the categories.

You're welcome my fellow seeker.

Select the correct answer from each drop-down menu. Which are the features of conditional formatting? Conditional formatting enables you to and .

Answers

Answer: oracle planning data sheet.

Which validation check can be used on the following data. "XX000" 

1. Range

2. Limit

3. Format

4. Length ​

Answers

Answer:

Format and Length

Explanation:

If there is a range or limit on the data, you would need to know more about the format.

Successful businesses must have managers who are able to complete each of the management functions well. True False

Answers

Answer:

I think that is true.

acess labeling windows​

Answers

Answer:

I got the same thing

Explanation:

With what finger do you type the letter m​

Answers

Answer:

Index Finger

Explanation:

I type m with my middle because it’s just right down from j

All _______ that store more than one piece of data ​

Answers

Answer:All data structure that store more than one piece of data ​

.

Explanation:

In honor of Black History Month, write an essay about a black person who has inspired YOU in some way. This person does not have to be famous, it can be a coach, a pastor, or family friend. This essay must be 10 sentences or more.​

Answers

Answer:

I will be talking about Jackie Robinson. Robinson was known for playing baseball with the Brooklyn Dodgers from 1947 to 1956, I will share a few of his other accomplishment.

In 1935, Robinson graduated from Washington Junior High School and enrolled at John Muir High School Recognizing his athletic talents, Robinson's older brothers Mack (himself, an accomplished athlete and silver medalist, at the 1936 Summer Olympics) and Frank inspired Jackie to pursue his interest in sports.

At Muir high school , Robinson played several sports , football, basketball, track, baseball and tennis. He played shortstop and catcher on the baseball team, quarterback on the football team, and guard on the basketball team. With the track and field squad, he won awards for the broad jump.

In 1936, Robinson won the junior boys singles championship at the annual Pacific Coast Negro Tennis Tournament.

He earned a place on the annual baseball tournament all-star team,

In late January 1937, the News newspaper reported that Robinson "for two years had been the outstanding athlete at John Muir, starring in football, basketball, track, baseball and tennis.

As Jackie was encouraged to move forward by his brothers Mack and Frank. Today, his accomplishments inspires me to keep moving forward.

Explanation:

it connects computers in different cities and different countries

Answers

Answer:

I think VPN firewall devices can do that.

It depends how close the cities are haha. If they are super, super, close then a LAN. But if they are farther, or even as far as countries then a GAN.

Edhesive 8.5 code Practice help me pls

Answers

Answer:

twainQuotes = ['I have never let my schooling interfere with my education.', 'Get your facts first, and then you can distort them as much as you please.', "If you tell the truth, you don't have to remember anything.", 'The secret of getting ahead is getting started.', "Age is an issue of mind over matter. If you don't mind, it doesn't matter. "]

print(twainQuotes)

twainQuotes.sort()

print(twainQuotes)

twainQuotes.insert(1,'Courage is resistance to fear, mastery of fear, not absence of fear.' )

print(twainQuotes)

Explanation:

ok

The program is an illustration of lists and list manipulation

Lists

Lists are variables that are used to hold multiple values in one variable name

Python Program

The program in Python, where comments are used to explain each line is as follows:

#This initializes the list

twainQuotes = ['I have never let my schooling interfere with my education.', 'Get your facts first, and then you can distort them as much as you please.', "If you tell the truth, you don't have to remember anything.", 'The secret of getting ahead is getting started.', "Age is an issue of mind over matter. If you don't mind, it doesn't matter. "]

#This prints the list elements

print(twainQuotes)

#This sorts the list elements

twainQuotes.sort()

#This prints the sorted list

print(twainQuotes)

#This inserts an element into the list

twainQuotes.insert(1,'Courage is resistance to fear, mastery of fear, not absence of fear.' )

#This prints the new list

print(twainQuotes)

Read more about lists and list manipulations at:

https://brainly.com/question/24941798

Other Questions
Do you think court interpretations should change over time ? The science club has five female and five male students. The club will randomly select two people to compete in the upcoming science competition.What is the probability that both people chosen are females?StartFraction 1 Over 90 EndFractionOne-fifthTwo-ninthsOne-fourth - 9-(-5)+12+ (-15) = HELP ASAP!! In a right triangle, the longer leg is twice the shorter leg and the hypotenuse is 8 more than the shorter leg. Find the length of the shorter leg. Use the line plot below to determine the number of times less than 14 pieces of trash were collected at recess. A. 0 B. 5 C. 6 D. 9 i need help with this pls. Write why Fort Sackville might have been built where it was located Which transformation could NOT be used to prove that two circles are congruent to one another?a dilation with a scale factor of 2a dilation with a scale factor of 1a reflectiona rotation French plllzz helpright answer please Translate the following expressions into EnglishbricolerEn France, il y a vingt quipes professionelles de football.T.TrueF.False The perimeter of a regular hexagon is 24x + 48. Which expression below can represent thelength of one side? 3x + 6B 6x + 12c 4x + 8D 8x + 16 There are 42 students in a class.Each student walks to school or cycles to school or gets the bus to school.There are 23 girls in the class.10 of the girls walk to school.6 of the boys cycle to school.7 of the 11 students who get the bus to school are boys.Find the number of these students who walk to school.Your final line must say, Number who walk to school = ... Somebody help ASAP hurry PLEEEASE HELP ME, QUICK!!!! ITS WORTH 20 POINTS!!!tell me if the statement below is sometimes, always, or never true. justify your reasoning, (the Expressions x - 3 + y -3 represent the same value.) Which statement best explains the legal basis for the right to privacy?It was a new theory proposed by activist justices in the 1960s.It developed gradually through legal precedents and Supreme Court rulings.It is clearly named in the amendment forbidding search and seizure.It evolved as protection from the invasive technologies of the twentieth century. the product of two consecutive integers is 5 more than three times the larger integer. Find the larger integer. please help! A triangle has side lengths of 4cm, 6cm, and 11cm. Is the triangle acute, obtuse, or right? she really thought. i added her but she ain't saying nothing The population of the city of Atlantis on March 30, 2008 was 183,000. The number of new active cases of TB occurring between January 1 and June 30, 2008 was 26. The number of active TB cases according to the city register on June 30, 2008 was 264. The incidence rate of active cases of TB for the 6-month period was: help with both please RIGHT ANSWER GETS BRANLIESTWhich image would best illustrate a main point about how a celebration of heroes would reward people for doing good things?