Given a scenario where a system should notify a user if the storage space goes below 5% or above 95%. Which of the following combinations of operators will be suitable for the condition?

  • if storage < 5 or storage > 95:
  • if storage <= 5 or storage >= 95:
  • if storage > 5 and storage < 95:
  • if 5 <= storage <= 95:
To check if the storage space goes below 5% or above 95%, you should use the condition if storage <= 5 or storage >= 95:. This condition covers both cases, ensuring that the system notifies the user when the storage falls below 5% or exceeds 95%. The other options do not provide the correct combination of operators for this scenario.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *