So it turns out the weather in Indonesia is beautiful... but also far too hot most of the time.
Given two variables: heat
(0 - 50 degrees centigrade) and humidity
(scored from 0.0 - 1.0), your job is to test whether the weather is bearable (according to my personal preferences :D)
- If the
humidity
is over0.5
, orheat
is above35
, it's not bearable - returnfalse
. - If
heat
is more than25
but less than36
, bearability depends on humidity. Ifhumidity
is above0.4
in this scenario, returnfalse
. - If
heat
is less than or equal to25
returnfalse
. - Otherwise... it's sunbathing time, so return
true
!