Skip to content

uhhh coding thing

Notifications You must be signed in to change notification settings

josh-crypto67/chicken-butt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bd8d759 · · Sep 28, 2025

History

3 Commits
Sep 28, 2025
Sep 28, 2025
Sep 28, 2025

Repository files navigation

chicken-butt

import random

def number_guessing_game(): print("🎯 Welcome to the Number Guessing Game!") number_to_guess = random.randint(1, 100) attempts = 0= 0

while True:
    try:
        guess = int(input("Guess a number between 1 and 100: "))
        attempts += 1

        if guess < number_to_guess:
            print("Too low! Try again.")
        elif guess > number_to_guess:
            print("Too high! Try again.")
        else:
            print(f"🎉 Congratulations! You guessed it in {attempts} tries.")
            break
    except ValueError:
        print("Please enter a valid number!")
er!")
id number!")
number_to_guess: print("Too high! Try again.") else: print(f"🎉 Congratulations! You guessed it in {attempts} tries.") break except ValueError: print("Please enter a valid number!") print("Please enter a valid number!")umber!")" tabindex="0" role="button">

Start the game

number_guessing_game()

About

uhhh coding thing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published