Quick Start: Your first Clojure program

 

The following Clojure program prints to the console a sentence about a range of temperatures:

1.       The range is made of the temperatures that are an odd number between -8 degrees Celsius and 43 degree Celsius

2.       The sentence has the following structure: “X Celsius is Y Fahrenheit, Z”, where

  • a. X is the temperature in Celsius
  • b. Y is the temperature in Fahrenheit
  • c. Z is a summary of the temperature according to the following definition:

i.   between 6 degrees Celsius (inclusive) and 25 degrees Celsius (exclusive), it’s moderate

ii.  above 25 degrees Celsius (exclusive), it’s hot

iii.  otherwise, it’s cold