-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.py
35 lines (30 loc) · 780 Bytes
/
ui.py
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
import count
# from count import *
# count.in
def get_user_input():
value = input("enter action number\n \
1 for increment\n \
2 for decrement\n \
3 for reset\n \
4 for display\n \
5 exit\n"
)
return int(value)
def main():
counter = 0
isWorking = True
while isWorking:
user_input = get_user_input()
if user_input == 1:
counter = count.increment(counter)
elif user_input == 2:
counter = count.decrement(counter)
elif user_input == 3:
counter = count.reset()
elif user_input == 4:
print("count ==> ", counter)
elif user_input == 5:
isWorking = False
print("user input ==> ", user_input)
# increment(user_input)
main()