GAME FOR FUN:
Today, I decided to add a little fun to my tea time — a cozy guessing game that I created myself! π
It’s called “Guess My Secret Number — Tea Time Edition” and it’s super simple:
-
I think of a number between 1 and 20.
-
You get 5 chances to guess it.
-
Along the way, there are hints, cozy messages, and lots of tea-themed fun! ☕
Even if you don’t win, the game reminds you that it’s okay to relax and enjoy the little moments — just like sipping tea.
“Win or lose, there’s always time for tea.”
import random
print("☕ Welcome to 'Guess My Secret Number' — Tea Time Edition! π΅")
print("I'm thinking of a number between 1 and 20.")
print("Try your luck and take a cozy guess! ✨")
secret_number = random.randint(1, 20)
for guesses_taken in range(1, 6):
guess = int(input(f"π Attempt {guesses_taken}: Your Guess? "))
if guess < secret_number:
print("π Too low! Think higher... ☁️")
elif guess > secret_number:
print("π Too high! Think lower... π")
else:
break # Correct guess
if guess == secret_number:
print(f"π Yay! You guessed it in {guesses_taken} tries! Time to celebrate with tea! ☕")else:
print(f"π’ Oh no! The secret number was {secret_n}. Don't worry — enjoy some tea anyway!π΅")print("π Thanks for playing at Tea Time with Huda!")
Here a cozy game and you can play it on googlecolab just you have to copy and paste theabove formula.π

.jpeg)
This comment has been removed by a blog administrator.
ReplyDelete