Hello my assignment is :
Create a system that allows the user to enter their name, title, surname, Dob, email and phone number. Once details are submitted, they should be written to a file.
Surnames that start with the letter A
-L
should be written to one file. Surnames that start with M
-Z
should be written to the second file. The user should have the option to view the contents of either file. Also it should output details in alphabetical order (by surname)
output details of user over 30.
The problem I am getting is I don't know how to put surnames that start with the letter A
-L
should be written to one file and surnames that start with M
-Z
should be written to the second file.
import pickle
import time
print (time.strftime("%d/%m/%Y"))from datetime import date
import pickle
import time
print (time.strftime("%d/%m/%Y"))
from datetime import dateprint("Hello welcome to the program")
title = input("Please enter your prefered title")
response = None
if response not in ("Mr","Mrs","Miss","Dr"):
response = input("Incorrect try again.Please enter your prefered title")
name = input("Please enter your name")
surname = input("Please enter your surname")
Dob = input("Enter your date of birth in this format: dd/mm/yy")
print("Your initials are:",name[0],surname[0])
fullname = title + name +" "+ surname