This repository was archived by the owner on Apr 17, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathValorantSensCalc.py
More file actions
102 lines (84 loc) · 4.59 KB
/
Copy pathValorantSensCalc.py
File metadata and controls
102 lines (84 loc) · 4.59 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
print('This program calculates the perfect sensitivity based on your liking')
print(' ')
print(' ')
print(' ')
data_valid =False
while data_valid == False :
dpi = input('type the dpi you are using (ex: 800 or 1600) ')
print(' ')
try:
dpi = float(dpi)
except:
print('Invalid input. Only numbers are accepted.')
continue
if dpi <= 0:
print('The dpi should be above 0. It cannot be below or equal to 0')
continue
else:
data_valid = True
ms = 280/dpi
hs = ms*2
ls = ms/2
print('High SEN---Middle SEN---Low SEN')
print(' ---',hs,' -------',ms,'------- ',ls,'--- ')
print(' ')
print('Now use the high sens and low sens and choose which one you like the most')
print(' ')
def LDSChoice():
while True:
LDS = input('Which sensitivity did you like? Put in the form 1=High Sens or 2=Low Sens. ')
print(' ')
try:
LDS = float(LDS)
except:
print('Invalid input. Only 1 or 2 are accepted.')
continue
if LDS <1:
print('Invalid input. Only 1 or 2 are accepted')
continue
elif LDS >2:
print('Invalid input. Only 1 or 2 are accepted')
continue
else:
return LDS
LDS = LDSChoice()
if LDS == 1:
Nhs = round(hs,3)
Nms = round(((hs+ms)/2),4)
Nls = round(ms,3)
print('The new values for the High SEN, Middle SEN, and Low SEN are as listed in the same order')
print(' ')
print('High Sens-',Nhs,', Middle Sens-',Nms,', Low Sens-',Nls)
elif LDS == 2:
Nhs = round(ms,3)
Nms = round(((ms+ls)/2),4)
Nls = round(ls,3)
print('The new values for the High SEN, Middle SEN, and Low SEN are as listed in the same order')
print(' ')
print('High Sens-',Nhs,', Middle Sens-',Nms,', Low Sens-',Nls)
print(' ')
while True:
ynchoice = input('Do you wish to continue getting a better sens? Yes/No? ').lower()
print(' ')
if ynchoice == 'yes' or ynchoice == 'y' or ynchoice == '2':
LDS = LDSChoice()
if LDS == 1:
Nhs = round(Nhs,3)
Nms = round(((Nhs+Nms)/2),4)
Nls = round(Nms,3)
print(' ')
print('The new values for the High SEN, Middle SEN, and Low SEN are as listed in the same order')
print(' ')
print('High Sens-',Nhs,', Middle Sens-',Nms,', Low Sens-',Nls)
print(' ')
elif LDS == 2:
Nhs = round(Nms,3)
Nms = round(((Nms+Nls)/2),4)
Nls = round(Nls,3)
print(' ')
print('The new values for the High SEN, Middle SEN, and Low SEN are as listed in the same order')
print(' ')
print('High Sens-',Nhs,', Middle Sens-',Nms,', Low Sens-',Nls)
print(' ')
elif ynchoice == 'no' or ynchoice == 'n' or ynchoice == '1':
break