~ Taha
(Thanks Effective Altruism Canada for the room)
๐ First, setup your machine and get ready!
๐งช Then we solve 3 problems (starting ~ 2:30pm)
๐ง Problem #1: A warm up, and getting in the zone (Until 3:30pm)
โฝ๏ธ Present your code and discuss solutions together (Until 4:00pm)
๐ง Problem #2: More algorithmic and open ended one (Until 4:45pm)
โต๏ธ Problem #3: Most likely no problem 3 for today, to make this first event more chill.
You can’t store your program in a file. It should run in terminal like this: $ python -c “import this; something something;”
If you need to, you can only import standard libraries of your language.
Swap contents of two files:
[ i.txt, o.txt]
Rules:
You can create a third file if it helps, but your program needs to delete it after swapping is done.
Renaming files is allowed.
Flatten an arbitrarily deep nested list.
For example:
[10,20,[30,[40,"hi"],"oh"],50]
should output
[10, 20, 30, 40, 'hi', 'oh', 50]
The list must be read from a file named:
l.txt
Test Cases:
[10,20,30] -> [10,20,30]
[[10]] -> [10]
[["Hi"],[[10]]] -> ["Hi",10]
[[[20],["Hi"],"Hi",20]] -> [20,"Hi","Hi",20]
[[["[]"],"[]"]] -> ["[]","[]"]
Download test cases pasted on https://tahaashtiani.com/codegolf
Stay tuned for next event 0X002, hopefully at this room: