Skip to content
← Back to Community
Guess a number game
Profile icon
JaneDuncan

please figure out how to help me code this game for my tech class

Answered by margob [earned 5 cycles]
View Answer
Voters
Profile icon
ryniar
Profile icon
KrishPatel72
Profile icon
UrVaNsHAgGi
Profile icon
HusseinNamirNam
Profile icon
Saad193
Profile icon
AlbertJossy
Profile icon
KRISTIANROY1
Profile icon
anushamaheshwari
Profile icon
SathvikGogineni
Profile icon
JaneDuncan
Comments
hotnewtop
Profile icon
margob

someone help me as well, i dont understand this class

Profile icon
ash15khng

Hi, sorry in advance if I sound rude, but can you minimally give us a start and not expect us to help you to your homework for you? If you had a syntax error or a bug in your code somewhere I would be willing to help, but if you just expect us to give you the answer to your homework you should be doing, I don't think this is the right place to find it.

Profile icon
AzureScripts

If you want it in python, you could do

import random
number = random.randint(1,10) # You can change 1 - 10 to whatever, p.s this chooses a random number
print("Guess the number!")
choice = int(input("What is the number? : "))
if choice == number:
print("You got it right!")
else:
print("Wrong!")

Profile icon
AzureScripts

Remember to indent where the indents are needed

if choice == number:
print("Got it right")
else:
print("Got it wrong!")

Profile icon
ash15khng

Hello, do you have any kind of start to this?

Profile icon
Reader8765

Where is your effort? This can easily be accomplished with random, print, input, and if-else statements.

Profile icon
pyelias

What exactly is the game?

Profile icon
margob

@pyelias guess a number game, youre guessing a niumber in between 1 and 10 in python

Profile icon
JaneDuncan

@pyelias its a game called guess a number where you have to code a game for people to guess the number

Profile icon
JaneDuncan

@pyelias just email/text me

Profile icon
leon332157

What language?

Profile icon
JaneDuncan
Profile icon
JaneDuncan

@leon332157 please help

Profile icon
margob
Profile icon
JaneDuncan

@leon332157 just text email/text me

Profile icon
leon332157