help with loops in python
count = 0 while True: userName = input("Username: ") password = input("Password: ") count += 1 if count == 3: print('Too many login attempts. Goodbye.') break else: if userName == 'student' and password == 'abc123': print ("Login attempt sucessful!\n") print('\n''GAMES \n------------') print('1. Print the Pattern') print('2. Guess the Number') print('3. Logout') print ("\n\n") x=input ('>>Enter option: '); print('\n\n\n')#let them in while x in '1': print('Print the Pattern') z = input('Enter a whole number: ') n = int(z) s = input('Enter a symbol: ') for i in range(n): for j in range(i+1): print(s,end='') print() import random randAns = random.randint(0, 100) numberOfGuesses = 0 while x in '2': print('Guess the Number') # reading number from user ans = int(input('Between 0 and 100 : ')) print('\n') # incrementing numberOfGuesses numberOfGuesses += 1 # if user input matches the generated number # prints correct number and stops the loop # if user input is less it prints guess is less # else prints guess is greater than random number if ans == randAns: print('YOU GOT IT!') break elif ans < randAns: print('TOO LOW! \nGUESS AGAIN!') print('\n\n\n') elif ans > randAns: print('TOO HIGH! \nGUESS AGAIN!') print('\n\n\n') if x in '3': print('Goodbye. See you soon.') print('\n\n\n') else: print('Invalid Option')