Skip to content

Instantly share code, notes, and snippets.

@nhuntwalker
Created December 16, 2016 21:49
Show Gist options
  • Save nhuntwalker/6e1c38a84cdff4a07fd6c926df67b865 to your computer and use it in GitHub Desktop.
Save nhuntwalker/6e1c38a84cdff4a07fd6c926df67b865 to your computer and use it in GitHub Desktop.
Write a function that takes as arguments:
- a list of integers that represents a whole number
--> ex: [1, 2, 3 ,4] = 1234
--> ex: [8, 2] = 82
- a single-digit integer (-9 -> 9)
Return the sum of the whole-number version of the
list of numbers, and that single-digit integer, as a list
add_us([1, 2, 3, 4], -9) --> [1, 2, 2, 5]
email: nicholas@codefellows.com
add_us([0, 0, 1, 1], 9) --> [0, 0, 2, 0]
add_us([9, 9], 1) --> [1, 0, 0]
***LAST MINUTE DECREE***: Incoming List has at Least
Two Positive digits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment