An automated climate control system should only accept target temperature settings from 15 to 30 inclusive as valid inputs. If the user input violates this validation rule, an error message is displayed.
Complete the following pseudo-code program to output "Error: Temperature out of range" if the entered temperature does not meet the validation criteria.
You must use either:
target_temp = input("Enter target temperature in Celsius: ")
if target_temp < 15 ..... target_temp ..... then
..... ("Error: Temperature out of range")
endif
Practise OCR GCSE Computer Science Defensive design with exam-style questions for GCSE Computer Science. 14 questions, matched to the OCR GCSE Computer Science (J277) specification and written in Component 01 and Component 02 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.