-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain Code.py
35 lines (34 loc) · 1.75 KB
/
Main Code.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
#Jake Eaton
import time
name = input("Please enter the child's First Name. ")
lname = input("Please enter the child's Last Name. ")
dob = input("Please enter the child's date of birth. ")
gender = input("Please enter the child's Gender. ")
uid = input("Please enter the child's Unique ID. ")
hnn = int(input("Please type 1 to type in a house name or type 2 to type in a house number. "))
if hnn == 1:
hna = input ("Please enter the name of the child's house. ")
hs = input("Please enter the street of the child's house. ")
loc = input("Please enter the town, village or city. ")
pc = input ("Please enter the Postcode of the child. ")
hpn = input("Please enter the child's Home Number. ")
print("Thank you. Storing in your database now...")
email = name + "." + lname + "@matrixcommand.ne.oh"
writefile = open("students.csv","a")
writefile.write(name + "," + lname + "," + dob + "," + gender + "," + hna + "," + hs + "," + loc + "," + pc + "," + email + "," + uid + "," + hpn + "," +"\n")
writefile.close()
time.sleep(1)
print("Saved!")
elif hnn == 2:
hn = input("Please enter the number of the child's house. ")
hs = input("Please enter the street of the child's house. ")
loc = input("Please enter the town, village or city ")
pc = input ("Please enter the Postcode of the child. ")
hpn = input("Please enter the child's Home Number. ")
print("Thank you. Storing in your database now...")
email = name + "." + lname + "@matrixcommand.ne.oh"
writefile = open("students.csv","a")
writefile.write(name + "," + lname + "," + dob + "," + gender + "," + hna + "," + hs + "," + loc + "," + pc + "," + email + "," + uid + "," + hpn + "," +"\n")
writefile.close()
time.sleep(1)
print("Saved!")