Guess a number game
JaneDuncan (7)

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

You are viewing a single comment. View All
Answered by margob (1) [earned 5 cycles]
View Answer
AzureScripts (182)

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!")

AzureScripts (182)

Remember to indent where the indents are needed

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