Giter Club home page Giter Club logo

googlebillboard's Introduction

Google Billboard

In July of 2004 a mysterious billboard appeared in Silicon Valley. All it said was

 {first ten digit prime found in consecutive digits of e}.com

At the same time, an identical banner appeared in the Harvard Square subway station in Boston. No indication was given about the significance of the signs, but people who correctly discovered the ten digit prime and visited the website were given a subsequent puzzle. If they completed that problem correctly they received a fawning message encouraging them and their "Big, Magnificent Brain" to apply for a job at Google Labs.

Suggested steps to complete the assignment

  1. Go to https://codingbat.com/prob/p221207, log in, and do the isPrime problem
  2. You may find slides 4 - 42 of the APJavaStrings slide presentation helpful
  3. Now you are ready to start the project. Fork and clone down this repository
  4. In setup() or main() use the two argument version of substring() to pull out ten consecutive digits of e at a time. Convert them to doubles with Double.parseDouble(). Here's an example:
    String digits = e.substring(2,12);
    double dNum = Double.parseDouble(digits);
    System.out.println(dNum); //displays 7.182818284E9
    Note that by default, Java displays doubles in exponential form. 7.182818284E9 is 7.182818284 x 10^9.
  5. Finish the isPrime() to test if a number is prime.
  6. Add a loop to setup() or main() that moves through the digits of e until it finds the first 10 digit prime.
  7. Submit your project if you are using repl.it or codingrooms and ignore the directions below.
  8. Add commit and push your finished program to your github account.
  9. There is no website for this assignment, so instead of the GitHub pages URL, submit the url of your GitHub repository to Google classroom. The url of your repository will have the form http://github.com/ your github username /GoogleBillboard
  10. If you have extra time you may want to see if you can solve the second puzzle for extra credit. Clearly denote what you discovered the solve f(5).

googlebillboard's People

Contributors

mrchanr avatar simart avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.