GithubHelp home page GithubHelp logo

brianwangila / dam-js-counter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apprenticecloud/counter

0.0 0.0 0.0 137 KB

Counter project to increment by a number that was clicked

Home Page: https://brianwangila.github.io/DAM-js-counter/

JavaScript 43.49% CSS 20.86% HTML 35.65%

dam-js-counter's Introduction

counter

Clone the counter template code from here: https://github.com/apprenticecloud/counter

In this assignment your are supposed to add functionality for the +10, +15, +20 buttons

The +5 button functionality is already done for you as an example.

Description of what should happen when the buttons are clicked is described below.

the value in the <h1> tag should increment based on the value of the button clicked

e.g;

if the value in the button is +10 it should take the previous value in the <h1> tag and increment 10 to it. this is also what should happen if the +20 button is clicked. The previous value should be taken and 20 added onto it.

NOTE: Stick to the function approach because that is what we covered today and it would suite you best if you deeply understood functions.

Advanced Assignment

Heads or Tails

For those of you who feel the challenge above is a basic assignment and you completed it within a split second here is some juice.

Create a heads or tails game that will be played by a real person and a computer.

The game should go for 5 rounds and the winner will be determined by who guessed the most rights on the 5 rounds.

example:

round 1:

computer guessed tails and you guessed heads

outcome: heads

you get a 1 and computer gets a 0 (zero)

round 2:

computer guessed tails and you guessed heads

outcome: heads

you get a 2 and computer gets a 0 (zero)

round 3:

computer guessed heads and you guessed heads

outcome: heads

you get a 3 and computer gets a 1

round 4:

computer guessed tails and you guessed heads

outcome: tails

you get a 3 and computer gets a 2

round 5:

computer guessed tails and you guessed heads

outcome: heads

you get a 4 and computer gets a 2

You become a winner in this set because you guessed the most correct predictions

ALSO NOTE: for the advanced assignment you will need to start off from scratch i.e; HTML, CSS and JS. Push it to its' own github repository. Don't mix the 2 assignments.

All assignments should be hosted on github pages and links submitted to google classroom

This is the coin side that will be used. They can be found in the assets/images folder

Heads

Heads

Happy Coding :)

dam-js-counter's People

Contributors

apprenticecloud avatar brianwangila avatar edwinmurimi 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.