Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def regras():
- print("A password deve ter as seguintes regras: n")
- print("d1: Apenas 1 maiuscula")
- print("d3: Deve usar 2 do set [! # - * + & % @ _] ")
- print("d5: Apenas 1 digito")
- print("d6: Começar por uma Letra n")
- print("E não pode: n")
- print("x2: Começar por um caracter especial ")
- print("x3: Usar caracteres fora do set [a-z A-Z 0-9 ' '] + [! # - * + & % @ _] ")
- print_regras = regras()
- print (" ")
- numero_aluno = input("Insira o número de aluno: ")
- Password = input("Insira uma password: ")
- def check_maiusculas(input):
- maiusculas = 0
- lista_maiusculas = "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z".split()
- for char in input:
- if char in lista_maiusculas:
- maiusculas += 1
- if maiusculas == 1:
- return True
- else:
- return False
- def check_set(input):
- set = 0
- lista_set = "! # - * + & % @ _".split()
- for char in input:
- if char in lista_set:
- set += 1
- if set == 2:
- return True
- else:
- return False
- def check_numeros(input):
- numeros = 0
- lista_numeros = "1 2 3 4 5 6 7 8 9 0".split()
- for char in input:
- if char in lista_numeros:
- numeros += 1
- if numeros == 1:
- return True
- else:
- return False
- def check_comecarletra(input):
- comecarletra = 0
- lista_letra = "A-Z"[0] or "a-z"[0].split()
- for char in input:
- if char in comecarletra:
- comecarletra +=1
- if comecarletra == str("A-Z") or comecarletra == str("a-z"):
- return True
- else:
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement