Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 585 Bytes

vector-excercise-weather-forcast.md

File metadata and controls

22 lines (16 loc) · 585 Bytes

Exercises Weather Forecast

Note::Make a vector

Make a vector of the high temperatures for the next 7 days in the town where you live. Then use the nth function to get the high temperature for Thursday.

()
;; A vector of the temperatures for the next week
[9 2 -3 4 5 9 4]

;; assuming the first temperature is for Monday, then to get Thursday we can write
(nth [9 2 -3 4 5 9 4] 3)

Remember that the index of a vector starts at zero