top of page

pycode share Group

Public·2 members



hi evryone this is my code hope you like it ☺️




print("This is a simple game that allows the user to guess a number between 1 and 100.")


# The game starts by generating a random number.

number = 76


# The user is then prompted to enter a guess.

user_guess = input("Please enter your guess: ")



# The guess is then compared to the random number.

if user_guess == number:

print("Congratulations! You guessed the number correctly!")

elif user_guess < number:

print("Your guess was too low.")

else:

print("Your guess was too high.")


# The game then asks the user if they want to play again.

play_again = input("Would you like to play again? (y/n) ")


# If the user says yes, the game starts over.

if play_again == "y":

print("Starting new game...")

else:

print("Thanks for playing!")

pycode.share shout out
29 December 2023 at 3:00 am – 30 December 2023 at 3:30 amonline conference
Register Now

bottom of page