Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
pico menu
menuTree={"Main": {"Options":["Sensor 1","Sensor 2","Heater 1","Heater 2","Mixer","Pressure"],"Position":0}, "Sensor 1":{"Options":["View","Calibrate","Set actions"],"Position":0}, "Sensor 2":{"Options":["View","Calibrate","Set actions"],"Position":0} } def printMenu(title,action): if menuTree[title]: print(title) if action=="up": menuTree[title]["Position"]=menuTree[title]["Position"]+1 elif action=="down": menuTree[title]["Position"]=menuTree[title]["Position"]-1 elif action=="select": printMenu(menuTree[title]["Options"][menuTree[title]["Position"]]) print(" ",menuTree[title]["Options"][menuTree[title]["Position"]-1]) print(" *",menuTree[title]["Options"][menuTree[title]["Position"]]) print(" ",menuTree[title]["Options"][menuTree[title]["Position"]+1]) printMenu("Main","")
run
|
edit
|
history
|
help
0
total_tips
LinkedList implementation
on_off
три шарика в матрице
shiva
ACII_Art
Evaluacion 2 -ICA
75
guess123
Filter String