#C13474. Temperature Threshold Check
Temperature Threshold Check
Temperature Threshold Check
You are given a list of temperature readings. Each reading is provided as a floating-point number along with a scale, which is either Celsius ('C') or Fahrenheit ('F'). Your task is to determine whether any of the given temperature readings fall below the operational limits. Specifically, in Celsius the threshold is \(0^\circ C\) and in Fahrenheit it is \(32^\circ F\). If any temperature is below its corresponding threshold, print True
; otherwise, print False
.
Note: The input is taken from standard input, and the output must be printed to standard output.
inputFormat
The first line contains an integer \(n\), representing the number of temperature readings. The following \(n\) lines each contain a floating point number and a character (either C
for Celsius or F
for Fahrenheit), separated by space.
Example:
4 10 C 40 F 5 C 50 F
outputFormat
Output a single line: True
if any temperature reading falls below its respective threshold, otherwise False
.
4
10 C
40 F
5 C
50 F
False