subject

Guessing game project

you will create a python program in sandbox named guessing game.
start by putting the random function in your code line 1.
import random

with a print statement saying welcome to the guessing game.
next we will get python to create a random number between 1-10. this is how we do it.
number = random. randint(1, 10)

next we will create a variable called player_name and variable called number of guesses
player_name = input("hello, what's your name? ")
number_of_guesses = 0

now write a print statement that says welcome player_name to the guessing game!

write a print statement that says “you have up to 5 guesses to get the correct number!

using a while loop you will have the user get up to 5 guesses

while number_of_guesses < 5:
guess = int(input("enter your guess! "))
number_of_guesses += 1

***finish the rest on your own.
**hint you will use if statements to let the user know if they guessed too high or too low.
if guess == number you will put break in the code to end the loop.
then using print statement you will let the user know how many guesses it took them to get the correct number or you will tell them they lost.

good luck

this is for codehs i need the code

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Consider how gaming consoles initially relied on joysticks and joypads and then made the switch to modern gaming controls, which include analog sticks, buttons and switches, touch controls, accelerometers, motion controls, etc. name at least two kinds of gaming experiences that are possible with these new control devices but were not possible on original joysticks. explain how new technologies made this newer game style possible.
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
You know the right answer?
Guessing game project

you will create a python program in sandbox named guessing game. <...
Questions
question
Mathematics, 06.01.2020 03:31
question
Computers and Technology, 06.01.2020 03:31
question
Mathematics, 06.01.2020 03:31
question
Mathematics, 06.01.2020 03:31
Questions on the website: 13722367