Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8654e00

Browse files
committed
Update
1 parent 5ab7c2e commit 8654e00

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

‎cutoff.py‎

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#!/usr/bin/env python
2+
3+
from __future__ import division
4+
5+
print("\n***********[CUT OFF CALCULATOR]***********\n")
6+
7+
## Cut off Choice
8+
def menu():
9+
print("-------------------WELCOME-------------------")
10+
print("1. Cut Off Calculator - Engineering")
11+
print("2. Cut Off Calculator - Medical")
12+
print("3. Cut Off Calculator - Pure Science(Medical)")
13+
print("4. Cut Off Calculator - Agriculture")
14+
print("5. Exit")
15+
print("-------------------*******-------------------")
16+
17+
## User Input
18+
menu()
19+
CHOICE = input("\n033円[1;91mENTER YOUR CHOICE: 033円[1;m")
20+
21+
# Cut Off Calculator - Engineering
22+
if CHOICE == '1':
23+
try:
24+
25+
A = int(input('033円[1;32mEnter a Maths Mark = 033円[1;m'))
26+
B = int(input('033円[1;32mEnter a Physcis Mark = 033円[1;m'))
27+
C = int(input('033円[1;32mEnter a Chemistry Mark = 033円[1;m'))
28+
29+
## CalCulate Cut off
30+
D = (A/2 + B/4 + C/4)
31+
32+
except (SyntaxError, ValueError):
33+
34+
print("Empty Input or Wrong Input Value")
35+
36+
else:
37+
38+
print('033円[1;33mYOUR CUT OFF MARK IS = %s 033円[1;m' %D)
39+
40+
## Cut Off Calculator - Medical
41+
elif CHOICE == '2':
42+
43+
try:
44+
45+
A = int(input('033円[1;32mEnter your Biology Mark = 033円[1;m'))
46+
B = int(input('033円[1;32mEnter your Physics Mark = 033円[1;m'))
47+
C = int(input('033円[1;32mEnter your Chemistry Mark = 033円[1;m'))
48+
49+
## CalCulate Cut off
50+
D = (A/2 + B/4 + C/4)
51+
52+
except (SyntaxError, ValueError): ## Python3X
53+
54+
print("Empty Input or Wrong Input Value")
55+
56+
else:
57+
58+
print('033円[1;33mYOUR CUT OFF MARK IS = %s 033円[1;m' %D)
59+
60+
## Cut Off Calculator - Pure Science(Medical)
61+
elif CHOICE == '3':
62+
63+
try:
64+
65+
A = int(input('033円[1;32mEnter your Botany Mark = 033円[1;m'))
66+
B = int(input('033円[1;32mEnter your Zoology Mark = 033円[1;m'))
67+
C = int(input('033円[1;32mEnter your Physics Mark = 033円[1;m'))
68+
D = int(input('033円[1;32mEnter your Chemistry Mark = 033円[1;m'))
69+
70+
## CalCulate Cut off
71+
E = (A/4 + B/4 + C/4 + D/4)
72+
73+
except (SyntaxError, ValueError): ## Python3X
74+
75+
print("Empty Input or Wrong Input Value")
76+
77+
else:
78+
79+
print('033円[1;33mYOUR CUT OFF MARK IS = %s 033円[1;m' %E)
80+
81+
## Cut Off Calculator - Agriculture
82+
elif CHOICE == '4':
83+
84+
try:
85+
86+
A = int(input('033円[1;32mEnter your Biology Mark = 033円[1;m'))
87+
B = int(input('033円[1;32mEnter your Maths Mark = 033円[1;m'))
88+
C = int(input('033円[1;32mEnter your Physics Mark = 033円[1;m'))
89+
D = int(input('033円[1;32mEnter your Chemistry Mark = 033円[1;m'))
90+
91+
## CalCulate Cut off
92+
E = (A/4 + B/4 + C/4 + D/4)
93+
94+
except (SyntaxError, ValueError): ## Python3X
95+
96+
print("Empty Input or Wrong Input Value")
97+
98+
else:
99+
100+
print('033円[1;33mYOUR CUT OFF MARK IS = %s 033円[1;m' %E)
101+
102+
elif CHOICE == '5':
103+
print('Exiting')
104+
105+
else:
106+
print('033円[1;31m [-] Invalid option! 033円[1;m')

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /