-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgettingStarted.py
More file actions
executable file
·49 lines (44 loc) · 2.68 KB
/
Copy pathgettingStarted.py
File metadata and controls
executable file
·49 lines (44 loc) · 2.68 KB
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
48
49
### 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 == "In Slack, what is the secret passphrase posted in the #lab-python-getting-started channel posted by a TA?":
answer = "pcap"
elif 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 == "Is it possible to decode a message without a key? - Yes/No":
answer = "Yes"
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 = "342d8e138c83606172d791a297935421ef9daffff4f8a789c38ac9a8df1e68e8"
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 = 5
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
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": No
#"Is it possible to decrypt a message without a key? - Yes/No": No
#"Is it possible to decode a message without a key? - Yes/No": No
#"Is a hashed message supposed to be un-hashed? - Yes/No": No
#"What is the SHA256 hashing value of your NYU email and use the answer in your code - ": No
#"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":