Ok you Python-using heathens. What did you think for difficulty this time around?
Post your coding atrocities below.
For those of you who missed the early signups. Feel free to join the leaderboard late (though rankings are based on time).
Ok you Python-using heathens. What did you think for difficulty this time around?
Post your coding atrocities below.
For those of you who missed the early signups. Feel free to join the leaderboard late (though rankings are based on time).
Jump in the discussion.
No email address required.
I got both puzzles but don't laugh at my solution for the 2nd one
I've been very, very slowly teaching myself Python after learning Matlab at college
Jump in the discussion.
No email address required.
Everywhere that you think you need a tree of if/elif/else based on the same value you can use a dict:
Then you get the value using
val1 = val_map[val1]
or if you need a default, yourelse
here, use.get(key, default)
:Jump in the discussion.
No email address required.
zoz
Jump in the discussion.
No email address required.
zle
Jump in the discussion.
No email address required.
zozzle
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
That's a better example of the use of a dictionary than anything those coding bootcamps told me
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Proud of you, little buddy.
Jump in the discussion.
No email address required.
More options
Context
Never be ashamed of your solution if it gets the work done.
Especially since your solution is clean and understandable by everyone. Sure it's a bit convoluted, but who cares ;)
Jump in the discussion.
No email address required.
More options
Context
Part 2 solution is keyed, ignore the haters
Jump in the discussion.
No email address required.
More options
Context
I think your solution for the second one is really cute. In the future you can just use rfind though.
I love the little word games some people play with it to get it to work
Jump in the discussion.
No email address required.
More options
Context
More options
Context