Assignment 2a - PHP Temperature
"The Temperature Assignment"
For this assignment, you will use some of the skills picked up in our last class(es). For Part 1 and Part 2, complete them *by hand* — i.e., with as little AI assistance as possible. While it's always impossible for me to be sure, there are strong tell-tale signs when this doesn't happen; e.g. in the past before AI was generally available, *every* students assignment differed, almost in the same way that essays about the same topic will differ. Be prepared to answer *immediate* questions about exactly how your code works.
(There will be a part 1b, in which we will bring in the AI)
Part I
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.
Part II
Also, *color* each description accordingly; make "hot" red, "cold" blue, etc.
OR, even better
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 ☺
For turning in. Create another folder in your LIS5367 folder and call it "temperature." Name your MAIN (part I and II) project "index.php" — if you do this, then you should be able to see it at: http://torch.cci.fsu.edu/~YOURID/LIS5367/temperature
Additionally, turn your source code into Canvas as well. You can just copy and paste as text, if you like.
For Part III, you may come up with your own reasonable name for the file, but do please keep it in the "temperature" folder.