import random

def main():
    randNumber = random.randint(1, 10)

    print("Guess a number between 1 and 10.\n")

    runLoop = True
    i = 0
    while runLoop == True:
        i += 1
        guess = input("Enter your guess here: ")

        if int(guess) == randNumber:
            if i == 1:
                print("\nCongratulations! You took " + str(i) + " guess.")
            else:
                print("\nCongratulations! You took " + str(i) + " guesses.")
            runLoop = False
        else:
            print("\nPlease try again.")

main()

9e9455352fe88101a7af0ee12a1710537ae59bf6
<mask token>

<mask token>


def main():
    randNumber = random.randint(1, 10)
    print('Guess a number between 1 and 10.\n')
    runLoop = True
    i = 0
    while runLoop == True:
        i += 1
        guess = input('Enter your guess here: ')
        if int(guess) == randNumber:
            if i == 1:
                print('\nCongratulations! You took ' + str(i) + ' guess.')
            else:
                print('\nCongratulations! You took ' + str(i) + ' guesses.')
            runLoop = False
        else:
            print('\nPlease try again.')


<mask token>

<mask token>


def main():
    randNumber = random.randint(1, 10)
    print('Guess a number between 1 and 10.\n')
    runLoop = True
    i = 0
    while runLoop == True:
        i += 1
        guess = input('Enter your guess here: ')
        if int(guess) == randNumber:
            if i == 1:
                print('\nCongratulations! You took ' + str(i) + ' guess.')
            else:
                print('\nCongratulations! You took ' + str(i) + ' guesses.')
            runLoop = False
        else:
            print('\nPlease try again.')


main()

import random


def main():
    randNumber = random.randint(1, 10)
    print('Guess a number between 1 and 10.\n')
    runLoop = True
    i = 0
    while runLoop == True:
        i += 1
        guess = input('Enter your guess here: ')
        if int(guess) == randNumber:
            if i == 1:
                print('\nCongratulations! You took ' + str(i) + ' guess.')
            else:
                print('\nCongratulations! You took ' + str(i) + ' guesses.')
            runLoop = False
        else:
            print('\nPlease try again.')


main()

import random

def main():
    randNumber = random.randint(1, 10)

    print("Guess a number between 1 and 10.\n")

    runLoop = True
    i = 0
    while runLoop == True:
        i += 1
        guess = input("Enter your guess here: ")

        if int(guess) == randNumber:
            if i == 1:
                print("\nCongratulations! You took " + str(i) + " guess.")
            else:
                print("\nCongratulations! You took " + str(i) + " guesses.")
            runLoop = False
        else:
            print("\nPlease try again.")

main()
