@kiki2005/

Point score system-1

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import re

print("""
Point System:
~1 Uppercase Letter = 5 Points
~1 Lowercase Letter = 5 Points
~1 From 0-9 = 5 Points
~1 Allocated Symbol = 5 Points
~If Has All Add 10 Points
""")

points = 0

while points < 35:
    p = input("Input Password: ")

    if 8 < len(p) < 24:
        print("5 Points Added - length")
        points += 5
    else:
        print("Wrong length, it must be 8 to 24 characters")
        continue

    if re.search("[a-z]", p):
        print("5 Points Added")
        points += 5

    if re.search("[0-9]", p):
        print("5 Points Added")
        points += 5

    if re.search("[A-Z]", p):
        print("5 Points Added")
        points += 5

    if re.search("[!$%^&()_]", p):
        print("5 Points Added")
        points += 5

    if points == 25:
        points += 10

    print("You have {} points".format(points))