Web Programming for Non-Programmers

DCI 110

Winter 2019

Credits: 4

Requirements Met: SC, DCI Minor Core Elective

GitHub Site: https://github.com/dci110w19

Class Meeting Metadata
Meets: M
W (lab)
2:45 - 4:15pm
3:15 - 4:45pm
2:45 - 4:15pm
Classroom: CGL 212
Instructor's Metadata
Instructor: Jason T. Mickel, Ph.D.
E-Mail: mickelj@wlu.edu How to Email a Professor
Phone: (540) 458-8653
Office: Leyburn M33
Office Hours: M 11:00 - 12:00
T 11:00 - 12:00
W 1:00 - 2:00
Or by appointment

JavaScript Exercise #1: Temperature Converter25 points

Due Thursday, February 14 @ 11:55pm


To get your feet wet with JavaScript, design a simple Fahrenheit to Celsius temperature converter. The program will use it to convert an initial temperature, display it, and the report the conversions for the next 9 lower temps by 5.

Steps to Complete the Assignment

  1. Use the JSBin JavaScript and Console tabs to complete the exercise.
  2. Set up the following:
    1. Create a variable called tempF with an initial value of 212.
    2. Create a variable called tempC that calculates the Celsius value of tempF. The conversion formula is: c = 5/9(f-32). How is this written in JavaScript?
  3. Display the results of tempC using console.log with a message that is user-friendly. In other words, what sentence would make it clear to you what this program is doing?
  4. Change the value of tempF so that it is lowered by 5. Don't simply change the number to 207. Use arithmetic.
  5. Perform the conversion again and display the results as before.
  6. Repeat the last two steps 8 more times until the value of tempF is 167.
  7. Verify your results using a separate online temperature converter program. What good is your program if you give the wrong answers?
  8. Change the original value of 212 to something else. Are your conversions still correct?
  9. Copy the URL of your JSBin page, and submit it through Sakai.


JavaScript should be properly formatted following coding conventions discussed in class.

Your results should look something like this:

Sample image for how the results of Exercise 1 should look

Grading Specifications

You will be graded on:

  1. Accurately meeting all of the specifications above
  2. Following JavaScript coding rules and conventions discussed in class and in the textbooks
  3. Correct calculation results
  4. User-friendly output

The lab will begin with a full score of 25 points and deductions will be made according to the amount and severity of errors.