Skip to content

Instantly share code, notes, and snippets.

@tscizzle
tscizzle / js_exercises.html
Last active April 18, 2018 16:55
A few fun Javascript exercises
<!DOCTYPE HTML PUBLIC>
<html>
<head>
<title> Fun JS Exercises </title>
<!-- Load underscore.js
Feel free to use functions like _.each, _.map, _.filter, etc.
See docs here: http://underscorejs.org/
-->
@tscizzle
tscizzle / py_exercises.py
Last active March 15, 2018 16:01
A fun python exercise
################################################################################
# Exercise #0
# - Implement findPeople
# - findPeople takes 1 arg: a list of dicts of the form {'firstName': '__', 'lastName': '__'}
# - An element of DATA "matches" an element of the input list if it matches both firstName and lastName
# - findPeople should return a list of the same length as the input, with "matches" corresponding to
# each element of the input (for examples, see tests below)
# - If no match is found in DATA for some element of the input, the corresponding spot in the output array should be None
# - If multiple matches are found in DATA for an element of the input, choose the match with the largest age