-
Notifications
You must be signed in to change notification settings - Fork 0
/
gettingStarted.py
executable file
·47 lines (43 loc) · 2.61 KB
/
gettingStarted.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
36
37
38
39
40
41
42
43
44
45
46
47
### welcome_assignment_answers
### Input - All nine questions given in the assignment.
### Output - The right answer for the specific question.
def welcome_assignment_answers(question):
#Students do not have to follow the skeleton for this assignment.
#Another way to implement is using a "case" statements similar to C.
if question == "Are encoding and encryption the same? - Yes/No":
answer = "No"
elif question == "Is it possible to decrypt a message without a key? - Yes/No":
answer = "No"
elif question == "In Slack, what is the secret passphrase posted in the #lab-python-getting-started channel posted by a TA?":
answer = "?"
elif question == "Is a hashed message supposed to be un-hashed? - Yes/No":
answer = "No"
elif question == "What is the SHA256 hashing value of your NYU email and use the answer in your code - ":
answer = "74e309d43726183be7308b17acfed8b976f68086bf60a9f05414fadf9a7c5e64"
elif question == "Is MD5 a secured hashing algorithm? - Yes/No":
answer = "No"
elif question == "What layer of the TCP/IP model does the protocol DNS belong to? - The answer should be an integer number":
answer = "7"
elif question == "What layer of the TCP/IP model does the protocol ICMP belong to? - The answer should be an integer number":
answer = "3"
else:
### you should understand why this else case should be included
### what happens if there is a typo in one of the questions?
### maybe put something here to flag an issue and catch errors
answer = "This is not my beautiful wife! This is not my beautiful car! How did I get here?"
return(answer)
# Complete all the questions.
if __name__ == "__main__":
#use this space to debug and verify that the program works
debug_question = "Are encoding and encryption the same? - Yes/No"
print(welcome_assignment_answers(debug_question))
#Questions:
#"In Slack, what is the secret passphrase posted in the #lab-python-getting-started channel posted by a TA?":
#"Are encoding and encryption the same? - Yes/No":
#"Is it possible to decrypt a message without a key? - Yes/No":
#"Is it possible to decode a message without a key? - Yes/No":
#"Is a hashed message supposed to be un-hashed? - Yes/No":
#"What is the SHA256 hashing value of your NYU email and use the answer in your code - ":
#"Is MD5 a secured hashing algorithm? - Yes/No":
#"What layer of the TCP/IP model does the protocol DNS belong to? - The answer should be an integer number":
#"What layer of the TCP/IP model does the protocol ICMP belong to? - The answer should be an integer number":