GithubHelp home page GithubHelp logo

csci215_assignment_2's Introduction

CSCI215_Assignment_2_William Hundahl

Due 10 Oct 2017 @ 11:59 pm

The purpose of this assignment is for you to get practice doing “generic” programming activities using JavaScript. Each problem is worth 20% of the grade. You need to:

  • Create separate .html files for each of the following JavaScript programming problems below.

randompic.html

Randomly display 1 of 5 images on the screen when the page is loaded. Use whatever (PG) images you’d like.

processtext.html

Create a webpage that has an input <div>, an output <div>, and a button that when clicked it processes the text in the input <div> and places the results in the output <div>. Processing means: List all occurrences of each word along with their count. Matching is case-insensitive. For example (ordering of output is not important):

Input <DIV> The cat ate the bird. The Bird ate the Dog. The dog ate the cat.

Output <DIV> THE 6 CAT 2 ATE 3 BIRD 2 DOG 2

mathfun.html

Create a JavaScript program that calculates the maximum, minimum, mean, and median values of a set of numbers as well as the number of even numbers, odd numbers, prime numbers, and power-of-2 numbers. Using prompt pop-up box, ask a user to enter positive numbers one at a time. Also tell them at if they enter a -1 that means they are finished. Display the result in a nicely formatted table in the body of the website.

morsecode.html

Create a webpage that has an input <div>, an output <div>, and a button that when clicked it processes the text in the input <div> and places the results in the output <div>. Processing means: converting the Morse Code in the input <div> to English in the output div. Morse code represents characters of an alphabet as sequences of dits (short key closures) and dahs (longer key closures). If we let a period (.) represent a dit and a dash (-) represent a dah, then the Morse code version of the English alphabet is

A .- G --. M -- S ... Y -.--
B -... H .... N -. T - Z --..
C -.-. I .. O --- U ..-
D -.. J .--- P .--. V ...-
E . K -.-. Q --.- W .--
F ..-. L .-.. R .-. X -..-

One blank space is used to separate letters and three blanks are used to separate words. Here is an example:

Input <div> Output <div>

-.-. --- ..-. -.-. .-. --- -.-. -.- ... COFC ROCKS

emailverify.html

Create a webpage that has an input <div>, an output <div>, and a button that when clicked it processes the text in the input <div> and places the results in the output <div>.

  • Processing means: check to see if the input <div> contains a valid email address, which means:
    • One or more characters followed by an @ followed by one or more characters followed by a dot (.) followed by one or more characters.
  • If the email address is valid display a smiley face pic in the output <div>.
  • If the email address is not valid display a frowny face pic in the output <div>

THIS IS INDIVIDUAL WORK ONLY. IF I SUSPECT THE CODE IS NOT YOURS, YOU WILL NEED TO COME TO MY OFFICE TO TAKE A VERBAL TEST ON THE CODE YOU SUBMITTED.

csci215_assignment_2's People

Contributors

kabriggs991 avatar

Watchers

 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.