diff --git a/L4/Lab 4 Scrum.docx b/L4/Lab 4 Scrum.docx new file mode 100644 index 0000000000000000000000000000000000000000..77ecba30878a69ce4cdeda0f451a705d6cd8dc3c Binary files /dev/null and b/L4/Lab 4 Scrum.docx differ diff --git a/L4/Lab4FirstSprint/main.py b/L4/Lab4FirstSprint/main.py new file mode 100644 index 0000000000000000000000000000000000000000..a0791a51fed61d5e9ea24c98ed6a9baf3d60e018 --- /dev/null +++ b/L4/Lab4FirstSprint/main.py @@ -0,0 +1,22 @@ +import random +print("This is a password generator.") +print("Everyone is different so we are going to ask you some personal questions and generate a password with your given answers.\n") + +ansOne = input("Why does your best friend make you happy?\n") +ansTwo = input("What's the best compliment you've ever recieved?\n") +ansThree = input("Where is your favorite place to be?\n") + + +def strChange(a): + a = a.strip() + a = a.split(" ") + b = a[random.randint(0,len(a)-1)] + b += a[random.randint(0,len(a)-1)] + return b + +a = strChange(ansOne) +b = strChange(ansTwo) +c = strChange(ansThree) + +password = b + a + c +print(password) diff --git a/L4/Lab4SecondSprint/main.py b/L4/Lab4SecondSprint/main.py new file mode 100644 index 0000000000000000000000000000000000000000..3cc129fadeabd84564cf15acd5803749eb4b3807 --- /dev/null +++ b/L4/Lab4SecondSprint/main.py @@ -0,0 +1,35 @@ +import random +print("This is a password generator.") +print("Everyone is different so we are going to ask you some personal questions and generate a password with your given answers.\n") + +ansOne = input("Why does your best friend make you happy?\n") +ansTwo = input("What's the best compliment you've ever recieved?\n") +ansThree = input("Where is your favorite place to be?\n") + +def removeStr(a): + if "I" in a: + a.remove("I") + if "and" in a: + a.remove("and") + if "you" in a: + a.remove("you") + if "we" in a: + a.remove("we") + if "they" in a: + a.remove("they") + return a + +def strChange(a): + a = a.strip() + a = a.split(" ") + a = removeStr(a) + b = a[random.randint(0,len(a)-1)] + b += a[random.randint(0,len(a)-1)] + return b + +a = strChange(ansOne) +b = strChange(ansTwo) +c = strChange(ansThree) + +password = b + a + c +print(password)