-
Given the array ["pizza", "cheese", "steak"] Use .each to print out each word capitalized.
-
Given the array [1,2,3,4,5], use .each to create an array of each number doubled.
-
Given the array ["apple", "pie", "ice cream"], use .each to determine which string is the longest.
-
Given the array [1,2,3,4,5], use .each to give us an array consisting of only even numbers.
A linked list is a data structure used for storing collections of data. A linked list has the following properties.
- Successive elements are connected by pointers.
- Last element points to nil
- Can grow or shrink in size during execution of a program.
- Can be made just as long as required (until system memory is exhausted)
We are going to implement our own very version of blackjack.
Blackjack is a card game played at casinos.
The object of the game is to collect a number of cards that get as close to 21 as possible, while not going over.
A summary of the rules can be read here.
You are given an integer N. Find the digits in this number that exactly divide N and display their count. For N = 24, there are 2 digits - 2 & 4. Both these digits exactly divide 24. So our answer is 2.
If the same number is repeated twice at different positions, it should be counted twice, e.g., For N=122, 2 divides 122 exactly and occurs at ones' and tens' position. So it should be counted twice. So for this case, our answer is 3. Division by is undefined.
The Utopian tree goes through 2 cycles of growth every year. The first growth cycle occurs during the spring, when it doubles in height. The second growth cycle occurs during the summer, when its height increases by 1 meter.
Now, a new Utopian tree sapling is planted at the onset of the spring. Its height is 1 meter. Can you find the height of the tree after N growth cycles?
* Use black tool to open battery compartment. | |
* Put battery in. Plus side up. | |
* Plug ANT+ Dongle into computer. | |
* Go to fitbit.com/start | |
* Download Mac App | |
* Install Fitbit Connect | |
* Application will update on its own. | |
* Sign up for account, you can use Google or Facebook. | |
* Enter personal data. | |
* Select Fitbit Zip. |
You are to create a Pig Latin Translator that has a REPL that follows an interaction model similar to this.
Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an ay, or if a word begins with a vowel you just add way to the end. For example, pig becomes ig-pay, banana becomes anana-bay, and aadvark becomes aadvark-way.
> cat
Suppose we could access yesterday's stock prices as an array, where: | |
The indices are the time in minutes past trade opening time, which was 9:30am local time. | |
The values are the price in dollars of Apple stock at that time. | |
So if the stock cost $500 at 10:30am, stock_prices_yesterday[60] = 500. | |
Write an efficient function that takes stock_prices_yesterday and returns the best profit I could have made from 1 purchase and 1 sale of 1 Apple stock yesterday. | |
For example: |