Questions and Answers
Problems and Solutions
Quotes help make search much faster. Example: "Practice Makes Perfect"
Monday, May 1, 2017
Codefights Sample Solution for centuryFromYear
function centuryFromYear(year) {
a = year/100;
b = parseInt(a);
c = a % 1;
if(c>0){
return b+1;
} else {
return b;
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
This is an example of
scrolling text
using Javascript.
Popular Posts
Codeyear: Creating an array with recursion
//sample solution // Here is the array we will store results in var multiples = []; function multiplesOf(base, i) { // Base case ...
Codecademy > Learn Java > Methods: II Sample Solution
class Dog{ int age; public Dog(int dogsAge){ age = dogsAge; } public void bark() { System.out.println("Woof...
Codecademy: factorial
#sample solution def factorial(x): x = abs(x) #prevents error on negative numbers product = 1 for i in range(x): product = prod...
Codecademy Learn Phaser: Keyboard Events 10/12
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
Codecademy Comparison Operators 3/6
// Sample Solution using System; namespace ComparisonOperators { class Program { static void Main(string[] args) { ...
LearnStreet Python Lesson 9 Exercise 8
#sample solution def run(bottle): #your code here bottle.drink(250) bottle.refill(150) return bottle.amount_left cl...
Codecademy About You Exercises 1 to 4
<!-- sample solutions to Welcome to HTML! --> <h1>Bruce Wayne</h1> <!-- sample solutions to Speak in Paragraphs --> ...
Codefights isCaseInsensitivePalindrome(inputString)
//sample solution function isCaseInsensitivePalindrome(inputString) { var temp = inputString.toLowerCase(); var tempReversed = te...
What is the area of an N-sided regular polygon?
A regular polygon has sides of equal length. Type in the length of the side of a sided regular polygon: meters Compute
Codecademy Sample Solution: Codeyear Fonts
/*sample solution to style.css*/ /*code exists prior to this point*/ #logo{ font-family: Georgia; /*added code*/ width: 35%;...
No comments:
Post a Comment