Professional Documents
Culture Documents
Password Project
Password Project
Password Project
WRITTEN RESPONSES
Refer to the Create PT – Student Handouts document in Canvas for the full descriptions of each w
3.a.i
3.a.ii
The video shows how the code is run and the password it produces.
3.a.iii
The input asks the user for the website name and first and last name and day the
account was created and to enter a year in the last twenty years.
3.b.i
Blist =['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']
def getName(name):
i = 0
if name[i] in Blist:
Vlist.append(name[i])
# return Vlist
i += 1
getName(name)
3.b.ii
Vlist.append(year)
3.b.iii
Vlist = []
3.b.iv
The list takes all of their information and appends it into a list
3.b.v
It takes the the variables and append it to the end and also takes the initials of the name and
also take a the animal that is related to the year.
3.c.i
def webConv(web):
x = 0
web = web.lower()
while x <= 1:
Vlist.append(web[x])
x += 1
return Vlist
passwrd = ""
for i in webConv(web):
passwrd += str(i)
print(passwrd)
3.c.ii
def webConv(web):
x = 0
web = web.lower()
while x <= 1:
Vlist.append(web[x])
x += 1
return Vlist
passwrd = ""
for i in webConv(web):
passwrd += str(i)
print(passwrd)
3.c.iii
It converts the first two letter of the website into lowercase letters and puts it into the
list
3.c.iv
The password take the first two letters then it turns them both lower case and appends it into the
list
3.d.i
if year == "2002":
year = "Horse#1"
if year == "2003":
year = "Sheep#1"
if year == "2004":
year = "Monkey#1"
if year == "2005":
year = "Rooster#1"
if year == "2006":
year = "Dog#1"
if year == "2007":
year = "Pig#1"
if year == "2008":
year = "Rat#1"
if year == "2009":
year = "Oxen#1"
if year == "2010":
year = "Tiger#1"
if year == "2011":
year = "Rabbit#1"
if year == "2012":
year = "Dragon#1"
if year == "2013":
year = "Snake#1"
if year == "2014":
year = "Horse#2"
if year == "2015":
year = "Sheep#2"
if year == "2016":
year = "Monkey#2"
if year == "2017":
year = "Rooster#2"
if year == "2018":
year = "Dog#2"
if year == "2019":
year = "Pig#2"
if year == "2020":
year = "Rat#2"
if year == "2021":
year = "Oxen#2"
Vlist.append(year)
return Vlist
zodSign(year)
Second call:
Blist =['A','B', 'C', 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K'
'X' , 'Y' , 'Z']
def getName(name):
i = 0
if name[i] in Blist:
Vlist.append(name[i])
# return Vlist
i += 1
getName(name)
3.d.ii
takes the year and prints the year that is equivalent to the
Gets the first two letters of your first name and last name inorder for the password to work
3.d.iii
Result of the first call: