tgoop.com/CVV_CCN/11504
Last Update:
كود لعبه تخمين الرقم ليك 7 مرات تخمن الرقم
اضغط للنسخ
import random
play_again = "yes"
while play_again == "yes":
print("Welcome to the Number Guessing Game!")
print("I'm thinking of a number between 1 and 100. Can you guess it in 7 tries?")
number = random.randint(1, 100)
guesses_left = 7
while guesses_left > 0:
guess = int(input("What's your guess? "))
if guess == number:
print("Congratulations! You guessed the number!")
break
elif guess > number:
print("Too high.")
else:
print("Too low.")
guesses_left -= 1
print(f"You have {guesses_left} guesses left.")
else:
print(f"Game over. The number was {number}.")
play_again = input("Do you want to play again? (yes/no) ").lower()
print("Thanks for playing!")
BY 𖤍⁞CRACK OF EGYPT⁞𖤍
Share with your friend now:
tgoop.com/CVV_CCN/11504