⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’
Excalidraw Data
Text Elements
list = [“clean the lawn”, “mow the bedroom”, “organize my books”] importancelist = [1, 2, 3]
list[0] importancelist[0]
add to the list - name for the item - importance level print the list remove from the list - reprint the list, with the recently removed item having a strike through
Your to do list:
1. Clean the lawn
2. Mow the bedroom
3. Organize my books
Your to do list:
1. Mow the bedroom
2. Organize my books
mylist = [“mow”, “snow”, “bro”] mylist.append(“myitem”) mylist = [“mow”, “snow”, “bro”, “myitem”]
myimportancelist.append(3)
Basic Container System
You write a python script which can be interacted with something like this:
python3 myscript.py add myitem (2,2)
python3 myscript.py show
(0,0): ____ (0,1): ____ (0,2): ____ (1,0): ____ (1,1): ____ (1,2): ____ (2,0): ____ (2,1): ____ (2,2): mytem
python3 myscript.py add myitem2 (2,2)
python3 myscript.py show (0,0): ____ (0,1): ____ (0,2): ____ (1,0): ____ (1,1): ____ (1,2): ____ (2,0): ____ (2,1): ____ (2,2): mytem, myitem2
You can change how the interface works but the basic functionality needs to be there You need:
- Add add needs to take in a name and add to storage attempts to group similar things together ( you can choose how you wish to define “similar”. The easiest way is seeing if one is a substring of the other, or “in” the other. Google it. )
- Show ( or get, or whatever you wanna call it ) show alone would show all storage i could also say “show 2,2” and see only one slot
- Remove takes in a name and removes it from storage. Only one of it though. if i have two items that are both called myitem, and i run remove, then only one of those two myitems should be removed.
- Search Takes in a name and gives all coordinates it can find that name at, or a “similar” name at.
- The contents of the storage need to continue to exist even after you close the program, so you must find a way to write them to a file, and read them out of the file.
Here are the relevant topics youll want to research ( google all this stuff ):
- how to write to files ( file, open(), write(), close(). )
- Arrays
- for loops vs while loops
- tuples ( for coordinates )
- substrings
- arguments and parsing arguments ( sys.argv )