This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # [2016-11-21] Challenge #293 [Easy] Defusing the bomb | |
| # To disarm the bomb you have to cut some wires. These wires are either white, black, purple, red, green or orange. | |
| # https://www.reddit.com/r/dailyprogrammer/comments/5e4mde/20161121_challenge_293_easy_defusing_the_bomb/ | |
| # Demo at http://jsbin.com/fufohasawi/edit?js,console | |
| # | |
| # by Kory Becker | |
| # http://primaryobjects.com | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # [2016-11-07] Challenge #291 [Easy] Goldilocks' Bear Necessities | |
| # Write a function that returns the rows for each chair weight and porridge temperature combination that satisifes Goldilocks. | |
| # https://www.reddit.com/r/dailyprogrammer/comments/5bn0b7/20161107_challenge_291_easy_goldilocks_bear/ | |
| # Demo at http://www.r-fiddle.org/#/fiddle?id=gx70BvH8 | |
| # | |
| # by Kory Becker | |
| # http://primaryobjects.com | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # starStruck - Write a function that counts the number of stars in the input - but only Stars that are in a group of two or more count. Stars that appear by themselves don't count. Print the number of stars that count. | |
| # https://www.reddit.com/r/dailyprogrammer/comments/56mfgz/weekly_26_mini_challenges/ | |
| # Demo at http://www.r-fiddle.org/#/fiddle?id=KSCKA9Gp&version=2 | |
| # | |
| # by Kory Becker | |
| # http://primaryobjects.com | |
| # | |
| starStruck <- function(input) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var alexa = require('alexa-app'); | |
| var chatskills = require('chatskills'); | |
| var readlineSync = require('readline-sync'); | |
| var xml2js = require('xml2js').parseString; | |
| var request = require('request'); | |
| var deasync = require('deasync'); | |
| // Define an alexa-app | |
| //var app = new alexa.app('books'); | |
| var app = chatskills.app('books'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var alexa = require('alexa-app'); | |
| //var chatskills = require('chatskills'); | |
| //var readlineSync = require('readline-sync'); | |
| var xml2js = require('xml2js').parseString; | |
| var request = require('request'); | |
| var deasync = require('deasync'); | |
| // Define an alexa-app | |
| var app = new alexa.app('books'); | |
| //var app = chatskills.app('books'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Create a function that determines whether the sum of a list of numbers is even or odd. | |
| The function should return true if the sum is even and false if the sum is odd. | |
| Examples: | |
| For the numbers 1, 2, 3 the function will return true. | |
| For the numbers 2, 1, 4 the function will return false. | |
| 2. Create a function that determines whether the difference of a list of numbers is even or odd. | |
| The function should return true if the difference is even and false if the difference is odd. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Create a function, using a for-loop, that takes a number as an argument and prints "Lesson X" for X-many times. | |
| For example, if you call the function with the argument 3, it will print: | |
| " | |
| Lesson 1 | |
| Lesson 2 | |
| Lesson 3 | |
| " | |
| 2. Create another function, similar to the above, using a while-loop. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A. Arrays | |
| 1. Initialize an array with the names of your family. | |
| 2. Add a new name to the array. | |
| 3. Add one more name to the array. | |
| 4. Print the second and third names in the array to the console. | |
| 5. Create an associative array containing a list of songs and their author, and print the first and last song to the console. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # [2016-10-04] Challenge #286 [Easy] Reverse Factorial Function | |
| # https://www.reddit.com/r/dailyprogrammer/comments/55nior/20161003_challenge_286_easy_reverse_factorial/ | |
| # Your program should report what each number is as a factorial, or "NONE" if it's not legitimately a factorial. | |
| # | |
| revFac <- function(n, index = 2) { | |
| remainder <- n / index | |
| if (remainder > 1) { | |
| revFac(remainder, index + 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
| </head> | |
| <body> | |
| <div id="output"></div> |