Returning EOF error for generate =input('would you like to generate a new password?')
import random import string print('hi, welcome to the password generator') upp_num = 0 int_num = 0 low_num = 0 sym_num = 0 upper_list =[] lower_list = [] symbol_list=[] num_list=[] for i in string.ascii_uppercase: upper_list.append(i) random.shuffle(upper_list) for j in string.ascii_lowercase: lower_list.append(j) random.shuffle(lower_list) for k in [0,1,2,3,4,5,6,7,8,9]: num_list.append(k) random.shuffle(num_list) for l in ['/','-','%',';','&','#']: symbol_list.append(l) random.shuffle(symbol_list) generate=' ' while not (generate[0].lower()=='y' or generate[0].lower()== 'n'): generate = input('would you like to generate a new password?') if generate[0].lower()== 'y': new_password= True else: new_password=False print('thank you, bye') while new_password: while not upp_num<6: upp_num = int(input('Please give your number of upper case letters maximum of five')) while not low_num<6: low_num= int(input('Please give your number of upper case letters maximum of five')) while not int_num<4: int_num= int(input('Please give your number of upper case letters maximum of three')) while not sym_num<4: sym_num= int(input('Please give your number of symbols, maximum of three')) pass_list= [] while upp_num: pass_list.append(upp_list.pop()) upp_num-=1 while low_num: pass_list.append(low_list.pop()) low_num-=1 while int_num: pass_list.append(int_list.pop()) int_num-=1 while symbol_num: pass_list.append(symbol_list.pop()) int_num-=1 break pass_string = str(pas_list) print(pass_string)