Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,8 @@
"markdown.extension.toc.updateOnSave": false,
"python.testing.unittestArgs": ["-v", "-s", ".", "-p", "test_*.py"],
"python.testing.pytestEnabled": false,
"python.testing.unittestEnabled": true
"python.testing.unittestEnabled": true,
"githubPullRequests.ignoredPullRequestBranches": [
"main"
]
}
11 changes: 11 additions & 0 deletions challenges/challenge1.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,14 @@
Interpret what the final expression means in the context of allowing or blocking a login attempt.

"""
not(A and(B or not B))
not (A and True)
not A

The login credentials are not correct. The login attempt is blocked.

#Oleksandr Maksymikhin
#Momtaz Yaqubi
#Rafaa Ali
#Derek Karungani
#Myint Myat
31 changes: 31 additions & 0 deletions challenges/challenge2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,34 @@
# -*- coding: utf-8 -*-

"""
at_least_one = finance_access.union(tech_access).union(all_access)
both_fincance_tech = finance_access.intersection(tech_access)
exclusive = (finance_access.intersection(tech_access))

#lack access
lack_access = []
for i in All_employees:
has_access = False
for j in at_least_one:
if i == j :
has_access = True
if has_access == False:
lack_access.append(i)

print (lack_access)

overlap = both_fincance_tech

"""
_Recommendation
We recommend do add one more group that include
employeeID who have access to both finance and tech
data to manage this group separately_
"""


#Oleksandr Maksymikhin
#Momtaz Yaqubi
#Rafaa Ali
#Derek Karungani
#Myint Myat
5 changes: 5 additions & 0 deletions challenges/challenge3.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@
Are there risks? Indicate employees who might be exposed to unnecessary data.
Your output should visually highlight these relationships without explicitly listing them in a simple table or list. Think beyond just printing data—use a format that helps detect patterns at a glance.
"""
from matplotlib_venn import venn2
import matplotlib.pyplot as plt

venn2([finance_access,tech_access], set_labels =('Finace','Tech'))
plt.show()
24 changes: 24 additions & 0 deletions challenges/challenge4.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,27 @@
Optionally convert the result back to binary with bin(), but focus on the XOR operation itself.

"""
#Oleksandr Maksymikhin
#Myint Myat
#Rafaa Ali
#Derek Karungani

data_for_transmission_string = '1010101'
data_for_transmission = int(data_for_transmission_string,2)
security_key = int("1100110",2)
checksum = data_for_transmission ^ security_key
checksum_for_transmission = bin(checksum)



def receiver_verify_data(data_for_transmission_string,checksum_for_transmission):
data_after_transmission = int(data_for_transmission_string,2)
receiver_checksum = data_after_transmission ^ security_key

if receiver_checksum == checksum_for_transmission:
return "Transmission is successful"
else:
return "Transmission failed"

receiver_verify_data(data_for_transmission_string,checksum_for_transmission)