PHP Assignment 1 - The Temperature Assignment

"The Temperature Assignment"


For this assignment, you will use some of the skills picked up in our last class(es).

What I'd like you to do is to programmatically create a celsius/Fahrenheit conversion table, which will ultimately look somewhat like the following:

0 degrees F is equivalent to - 17.7 C, which is cold
1 degrees F is equivalent to -17.2 C, which is cold
...
...
76 degrees F is equivalent to  22.2 C, which is nice
...
...
100 degrees F is equivalent to 37.77 C, which is hot


It should have AT LEAST 100 lines/entries and should have at least 3 "gradations" of temperature (hot, cold, warm, nice, balmy, tropical, freezing etc) -- the precise names and amount are up to you, though they should be reasonable.

Decimal accuracy should be at least to the 10th for C. The "somewhat quick" conversion is fine, i.e.

F to C - Subtract 32, multiply by 5/9
C to F, Multiply by 9/5, add 32

To break it down, you'll need to think about the following tasks:

1) How to do math

2) How to do a finite loop, incrementing numbers

3) How to select an english description based on number input.

You might want to tackle each of these seperately.

BONUS (I mean, for brownie points only, no extra credit unless I'm amazed)

Also, *color* each description accordingly; make "hot" red, "cold" blue, etc.

SUPERBONUS (ditto)

Give each line its OWN color (slightly different from the one before and after) , resulting in a smooth gradient from a deep blue for cold to a bright red for hot.

For this you'd need to learn/review HTML/CSS colors, e.g. There are probably far easier options than RGB ☺

SUPERDUPERBONUS

I'm not sure, but for now I'm keeping this assignment as-is, despite the prevalence of AI type coding tools. Give it a shot on your own and I'm curious what embellishments you may come up with!


For turning in: Please ensure the url for the project is at: http://torch.cci.fsu.edu/~YOURID/LIS5367/temperature.php

"Turn in" this url to the appropriate assignment entry in Canvas.



Backlinks: FSU Courses:LIS5367:old front page