coding challenges

Answers to Various Coding Challenges

Guessing Game

  • Write a number guessing game that should determine a random number from 1-100 and allow the user to guess the number.
  • Report back whether the user's guess is correct, too high, or too low.
  • If the user guesses a number they've previously guessed, the program should notify the user and tell them this number.
  • The game should continue to prompt the user until they guess the correct number.
  • Once the user has guessed the correct number, the game should congratulate them and report the number of guesses used (minus any duplicate guesses).

Ruby / README

Chessboard

  • Write a program that creates a string representing an 8x8 grid.
  • Each position either has a space or a "#" character.
  • The characters should form a chessboard.

JavaScript

FizzBuzz

  • Write a program that prints all the numbers 1-100 but with the following exceptions.
  • Replace numbers divisible by 3 with "Fizz".
  • Replace numbers divisible by 5 with "Buzz".
  • Replace numbers divisible by both 3 and 5 with "FizzBuzz".

JavaScript


Ella Chiang is learning front-end web development at Hackbright Academy. She currently resides in San Francisco, CA.