Skip to content

Tag: python

How to make a board in python?

I am trying to create a board that lets users choose the number of rows and columns but I can’t seem to put anything together! For example if a user wants 3 rows and 3 columns I am trying to make it print out: My code so far: and this is what it outputs: I feel really dumb for not

Pass nested dictionary location as parameter in Python

If I have a nested dictionary I can get a key by indexing like so: Am I able to pass that indexing as a function parameter? Obviously, this is incorrect, I get TypeError: list indices must be integers, not str. How can I do it correctly? Answer You can use reduce (or functools.reduce in python 3), but that wo…

Google foobar gearing_up_for_destruction

I was doing the google foobar challenge but ran out of time on the following challenge i am trying to see what i did wrong. Challenge As Commander Lambda’s personal assistant, you’ve been assigned the task of configuring the LAMBCHOP doomsday device’s axial orientation gears. It should be pr…