-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode
More file actions
30 lines (25 loc) · 961 Bytes
/
Copy pathcode
File metadata and controls
30 lines (25 loc) · 961 Bytes
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
#Assign system to a specific operating system
#This variable indicates which operating system is currently running
system = "OS 4"
#Check the operating system and display the appropriate update message
if system == "OS 2":
print("No update needed")
elif system == "OS 1" or system == "OS 3":
print("Update needed")
#Assign approved_list to a list of approved usernames
approved_list = [
"elarson",
"bmoreno",
"tshah",
"sgilmore",
"eraab"
]
#Assign username to the username of a user attempting to log in
username = "bmoreno"
#Assign organization_hours to a Boolean indicating if the login is during organization hours
organization_hours = True
#Check if the user is approved and logging in during organization hours
if username in approved_list and organization_hours:
print("Login attempt made by an approved user during organization hours.")
else:
print("Either the username is not approved or the login attempt was made outside of organization hours.")