Sacred Hearts Academy
Use this sandbox https://edube.org/sandbox
Guess the number game
import random
print("I'm thinking of a number between 1 and 10.")
secret = random.randint(1, 10)
while True:
guess = int(input("Your guess: "))
if guess < secret:
print("Too low.")
elif guess > secret:
print("Too high.")
else:
print("You got it!")
break
import random
This tells Python you want to use the random module, which lets the computer pick random numbers.
print("I'm thinking of a number between 1 and 10.")
This shows a message on the screen so the player knows what the game is about.
secret = random.randint(1, 10)
This makes the computer secretly choose a number from 1 to 10 and saves it in a variable called secret.
while True:
This starts a loop that repeats forever until you tell it to stop. (We’ll break out of it later.)
guess = int(input("Your guess: "))
-
input(...)asks the player to type something. -
int(...)turns what they typed into a whole number. -
guessstores the number the player typed.
if guess < secret:
Checks if the guess is smaller than the secret number.
print("Too low.")
If the guess was smaller, the game tells the player it’s too low.
elif guess > secret:
This checks the opposite: is the guess bigger than the secret number?
print("Too high.")
If the guess was bigger, the game tells the player it’s too high.
else:
This means: if the guess is not too low and not too high, then it must be correct.
print("You got it!")
The game congratulates the player.
break
This stops the loop and ends the game.
Game Design https://editor.gdevelop.io/
Game Design https://play.unity.com/en/studio
Delight – VR/ AR https://edu.delightex.com/
username firstname2026
password hawaii2026
Sand Box – Python
Lab Safety Quiz
Machine Learning example https://ml2.mrthach.org/
Teachable Machine https://teachablemachine.withgoogle.com/
Coding https://academy.cs.cmu.edu/
Summer School TinkerCAD Login
2025-26 Upper School Weekly Schedule
Periods 1-4 are Mon, Wed, & Fri (60 minutes)
Periods 5-7 are Tue & Thur (85 minutes)







