Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def check(pesel):
- if (len(pesel) !=11) & (pesel.isdigit == false):
- return False
- return True
- def cal(pesel):
- yearborn = pesel[:2]
- monthborn = pesel[3:5]
- dayborn = pesel[6:8]
- return yearborn, monthborn, dayborn
- def enter_pesel():
- name = str(input("Name: "))
- psl = str(input("Pesel: "))
- res = check(psl)
- if res == False:
- print("Something goes wrong")
- if res == True:
- yb, mb, db = calc(psl)
- print(name + "born on: " + db + "." + mb + "." + yb)
- print("PESEL: " + pesel)
- def main():
- isRunning = True
- while isRunning:
- print("[*] MENU")
- print("[*] 1 - Start script")
- print("[*] 0 - End script")
- choice = input()
- if choice == "0":
- isRunning = false
- break
- else:
- continue
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement