Complete the code to check if both conditions are true using the correct logical operator.
if ($a -gt 5 [1] $b -lt 10) { Write-Output "Both true" }
The -and operator checks if both conditions are true.
Complete the code to check if either condition is true using the correct logical operator.
if ($x -eq 0 [1] $y -eq 1) { Write-Output "At least one is true" }
The -or operator returns true if at least one condition is true.
Fix the error in the code by choosing the correct logical operator to negate the condition.
if ([1] ($status -eq 'Success')) { Write-Output "Not successful" }
The -not operator negates the condition, so it is true when the status is not 'Success'.
Fill both blanks to create a condition that is true when $a is greater than 10 and $b is not equal to 5.
if ($a [1] 10 [2] $b -ne 5) { Write-Output "Condition met" }
-gt means greater than, and -and combines both conditions to be true.
Fill all three blanks to create a condition that is true when $x is less than 5 or $y is not equal to 10, but not when $z is true.
if (($x [1] 5 [2] $y -ne 10) -and [3] $z) { Write-Output "Complex condition met" }
-lt means less than, -or combines the first two conditions, and -not negates the last condition.