View on GitHub

temperature

This is a project that shows you how to create a basic code to show you the temperature of your enviroment.

Open this page at https://nathanbrianroberts.github.io/temperature/

Introduction to this project

This project will walk you though how to create a code that tells you the temperature of your enviroment you are in. You wil be introduced to variables and inputs, as well as loops.

The instructions are going to be in JavaScript. So please make sure you click onto JavaScript before moving onto the instructions.

The most important part; have fun!

Declaring your variable

A variable is a placeholder which stores values on the computers memory within the program. The best way to think of this is to think of containers that store items. Each container can store one item at a time, and they have to be relivant. So your may have one container that stores toys. So you start to place a toy into this container so it can be used later. You can not then place food into this container, only toys.

Creating a forever loop

A loop is a code that makes the computer repeat the instructions inside the loop over again until the condition has been met. The forever loop does this until the program has been killed (Stoped).

})

Getting the computer to record the current temperature

Now we have created our forever loop, we are going to create the instructions for the computer to record the temperature under the Temperature variable. But first, we need to tell the computer to wait.

Displaying the results

Now you have created the Algorythem for the computer to use to record the current temperature and store it on a variable. we are now going to create instructions that tell the computer to display the temperature variable when requested by the end user.