An automated laboratory control system processes setup parameters before executing an experiment. The details are entered into a program to validate the inputs against the following system safety constraints:
deviceID must not be emptymode must be either "ambient" or "vacuum"pressure must be between 100 and 1013 (inclusive)If any invalid data is detected, "ERROR" is displayed. If all data is valid, "READY" is displayed.
Complete the program to validate the inputs.
You must use either:
deviceID = input("Enter device ID: ")
mode = input("Enter ambient or vacuum: ")
pressure = input("Enter pressure: ")
systemActive = False
14 exam-style questions on OCR GCSE Computer Science Defensive design. Each one has a worked solution and a mark scheme showing where the marks go.