forked from wgxcodersdc/python-community
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLogicBooleaExtra.py
More file actions
64 lines (50 loc) · 1.56 KB
/
LogicBooleaExtra.py
File metadata and controls
64 lines (50 loc) · 1.56 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
## Math Calc Hist Eng PubSp Art Legal Cyber Acct Credit
b_record = [False, True, True, True, False, False, False, True, False, 60]
a_record = [False, True, True, False, True, False, True, True, False, 75]
c_record = [True, False, True, True, True, False, False, False, False, 54]
#for x in a_record:
# print(x)
Math = a_record[0]
Calc = a_record[1]
Hist = a_record[2]
Eng = a_record[3]
PubSp = a_record[4]
Art = a_record[5]
Legal = a_record[6]
Cyber = a_record[7]
Acct = a_record[8]
Credit = a_record[9]
##General Education completed?
if (Math or Calc) and Hist and (Eng or PubSp):
GenEd = True
print ("GenEd complete")
else:
GenEd = False
print ("GenEd non-complete")
##Major completed?
dlbMajor = False
if Art or Legal or Cyber or Acct:
Major = True
print ("Major complete")
if Cyber and Legal:
dlbMajor = True
else:
Major = False
print ("Major non-complete")
##Total credits completed?
dlbCredit = False
if Credit >= 60:
reqCredit = True
print ("Credit complete")
if Credit >= 75:
dlbCredit = True
else:
reqCredit = False
print ("Credits non complete")
##Ready to graduate???
if GenEd and Major and reqCredit:
print ("Congratuations! You have met all requirements to graduate.")
if dlbMajor and dlbCredit:
print("You will be recieving a double major degree in Cyber and Legal.")
else:
print ("Unfortunately you have not met all requirements to graduate. Review list above.")