Module 02 Weekly Project – Arithmetic with JavaScript

Module 02 Weekly Project – Arithmetic with JavaScript

Part 1: Temperature Warning

Using a script, create a variable that asks the user for the temperature in Fahrenheit.

Then, using a conditional statement, it should display a different message, depending on what number the user inputs.

  • If the temperature is above 32, display a message that states it is above freezing.
  • If the temperature is exactly 32, display a message that this is the freezing point.
  • If the temperature is below 32, display an alert window warning that it is below freezing.
  • If the temperature is invalid, display an alert window that informs the user and provides feedback about how to enter the temperature correctly.

Make sure that the messages for the user are clear and easy to understand. Below is an example of how your page might perform.

img1

Save the HTML and CSS files, adding your last name to the HTML filename (index_lastName.html).

Part 2

The second part of your assignment is to play the Dungeons of Kithgard level on codecombat.com. Learn to code in JavaScript while battling ogres. Exit the dungeon safely, recording your success with a screen capture.

img2

“I’ll handle this!” Codecombat.com

Module 02 Weekly Project – Arithmetic with JavaScript

Steps:

Visit codecombat.com. You can play as Anonymous, but if you create an account and log in, you’ll be able to save and track your progress, and you won’t have to repeat the beginning levels when you play the game again in later Modules.

Choose a warrior and select JavaScript as your language. If you don’t immediately get the warrior/code selection screen when you enter the dungeon, click on the Heroes button.

img3

Choose your avatar and select JavaScript as the language

Follow the directions at every level, planning, writing, and debugging your code to collect gems and gold and defeat the enemies. You will be guided and given increasing programming power as you triumph at each level.

When you exit the last level in the Dungeon at the Kithgard Gates, do a screen capture of your accomplishment.

Note: codecombat has simplified the WHILE conditional into a concept they call loop. But you know what it really is, don’t you!

img4

SAMPLE ASSIGNMENT
Powered by WordPress