• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

APCSLowell/GoogleBillboard: An AP Computer Science A programming assignment for ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

APCSLowell/GoogleBillboard

开源软件地址(OpenSource Url):

https://github.com/APCSLowell/GoogleBillboard

开源编程语言(OpenSource Language):

Processing 100.0%

开源软件介绍(OpenSource 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() 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() that moves through the digits of e until it finds the first 10 digit prime.
  7. Add commit and push your finished program to your github account.
  8. 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
  9. If you have extra time you may want to see if you can solve the second puzzle.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap