What's wrong with the entry-level number guessing game? Tries=tries+1 didn't work!

import random
secret = random.randint (1100)
guess = 0
tries = 0

print ("Ahoy! I"m the dread Pirate roberts, and I have a secret!")
print ("It is a number from 1 to 99. I"ll give you 6 tries.")

while guess! = secret and tries < 6:

guess = int(input("what"s yer guess?"))
if guess < secret:
    print ("too low")
elif guess > secret:
    print("too high")
    
tries=tries+1
    
if guess == secret:
    print("down!")
else:
    print("no more")
    print("the secret was",secret)
May.07,2021

https://www.liaoxuefeng.com/w.
https://www.liaoxuefeng.com/w.


import random
secret = random.randint(1,100)
print(secret)
guess = 0
tries = 6

print( "AHOY! I'm the dread Pirate roberts, and I have a secret!")
print("It is a number from 1 to 99. I'll give you 6 tries.")
for i in range(0,tries):
    -sharpaa  
    aa=False
    guess = int(input("what's yer guess?"))
    if guess < secret:
        print ("too low")
    elif guess > secret:
        print("too high")
    elif guess == secret:
        print("down!")
        -sharp
        aa=True
        -sharp
        break
if aa==True:
    print('Win')
else:
    print('Loser')

you can try the loop

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b409c2-2c555.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b409c2-2c555.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?