JStein92 / pingpong

The 3rd project for the Epicodus Intro to Programming class, using HTML, CSS and JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ping Pong

By Jonathan Stein

A website that returns a modified user input based on the factors of numbers they enter

Specifications

The program outputs a user's input and can do this over and over again, with new results each time depending on input.

  • Example Input: x
  • Example Output: x

The program disables/ignores non-numerical input from the user.

  • Example Input: Hello
  • Example Output: "Please Enter a Number"

The program ignores numbers less than 1.

  • Example Input: -5
  • Example Output: "Please Enter a Number Greater than 0"

The program takes a numerical input (x) and return every number from 1 to x.

  • Example Input: 5
  • Example Output: 1 2 3 4 5

In the range of numbers from 1-x program prints numbers divisible by 3 as "ping".

  • Example Input: 12
  • Example Output: 1 2 ping 4 5 ping 7 8 ping 10 11 ping

In the range of numbers from 1-x program prints numbers divisible by 5 as "pong".

  • Example Input: 12
  • Example Output: 1 2 3 4 pong 6 7 8 9 pong 11 12

In the range of numbers from 1-x program prints numbers divisible by 15 as "pingpong".

  • Example Input: 15
  • Example Output: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 pingpong

Content

Index.html:

  • This contains the Ping Pong game that lets the user input a number and see the results of the program.

Other:

  • Img folder to store local images
  • Styles.css for CSS formatting
  • Scripts.js for JavaScript and Jquery code

How to use

  1. Download project from GitHub: https://github.com/JStein92/pingpong
  2. Run HTML in preferred browser
  3. Follow instructions on page
  • Enter number in input box
  • Press "enter" or the submit button.
  • After submitting number, the site will display an output based on the specs given.

Legal Information

Copyright (c) 2017 Copyright Holder All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright jQuery Foundation and other contributors, https://jquery.org/

This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history available at https://github.com/jquery/jquery-ui

Descriptions of locations taken from Wikipedia. Images are not mine.

About

The 3rd project for the Epicodus Intro to Programming class, using HTML, CSS and JS


Languages

Language:JavaScript 57.2%Language:HTML 25.6%Language:CSS 17.2%