Python number guessing game

sadat
0
number = 19
gussed_number = 1
while(gussed_number<=9):
    print("You can only 9 times guss the number")
    gusse_the_number = int(input("Enter the number: \n"))
    if gusse_the_number<19:
        print("The number is too low. \n")
    elif gusse_the_number>19:
        print("The number is too big. \n")    
    else:
        print('you won the game')
        print(gussed_number,"Times you try to took finish it.\n")
        break
    print(9-gussed_number,"chanches you have left only \n"
    gussed_number = gussed_number + 1

if (gussed_number > 9):
    print('Game over')

Post a Comment

0Comments

Please Select Embedded Mode To show the Comment System.*