-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtool_menu.py
59 lines (45 loc) · 1.56 KB
/
tool_menu.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# import random
# import time
# import json
# import datetime
from mycolors import *
from leaderboard import *
# ...
from startPractice import *
# ...
def display_main_menu():
print("Welcome to the Command Practice Tool")
while True:
print("Choose an option:")
print("1. DevOps related commands")
print("2. Ethical Hacking related commands")
print("3. Basic commands")
print("4. Leaderboard")
print("5. Quit")
choice = input("Enter the option number: ")
if choice in ('1', '2', '3', '4', '5'):
return choice
else:
print("Invalid choice. Please choose a valid option.")
def display_practice_level_options():
print("Choose practice level:")
print("1. 10 commands practice")
print("2. 30 commands practice")
print("3. 50 commands practice")
level_choice = input("Enter the practice level: ")
if level_choice in ('1', '2', '3'):
return level_choice
else:
print("Invalid practice level. Please choose a valid option.")
# Function to display menu for basic command options
def display_basic_commands_menu(mypractice_name='basic_commands'):
print("Choose terminal commands options:")
print("1. Termux")
print("2. Windows CMD")
print("3. Windows PowerShell")
print("4. Linux Terminal")
terminal_option = int(input("Enter the option number: "))
if terminal_option in (1, 2, 3, 4):
practice_basic_commands(terminal_option)
else:
print("Invalid terminal option. Please choose a valid option.")