-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeff.py
More file actions
40 lines (32 loc) · 977 Bytes
/
deff.py
File metadata and controls
40 lines (32 loc) · 977 Bytes
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
import os
menu_items = {
"sign up": {
"name": "Sign up",
"description": "enter your info and save your account",
"order": 1,
},
"sign in": {
"name": "Sign in",
"description": "enter your username and passsword after you logged in your account",
"order": 2,
}
}
def menu1():
print(".....hi welcome to loggin app.....\nplese enter s to continue or e for exit .....")
def menu2():
index = 1
for key in menu_items:
print(f"\t{index}. ", menu_items[key]['name'])
print(f"\t\tHelp text: {menu_items[key]['description']}\n")
index += 1
print("\te. Exit\n")
def correct():
print("please enter correct option!!")
def menu_signup():
print()
def clear():
if os.name == 'nt':
os.system('cls')
def sort_menu(menu2: dict):
func = lambda x: x[1]['order']
return dict(sorted(menu2.items(), key=func))