Complete the code to declare a boolean variable named is_active with the value true.
let is_active: bool = [1];In Rust, the boolean type is bool and the values are true or false (all lowercase).
Complete the code to assign the result of a comparison to a boolean variable.
let is_equal: bool = 5 [1] 3;
The == operator checks if two values are equal and returns a boolean.
Fix the error in the boolean expression to check if x is less than 10.
let x = 7; let is_less = x [1] 10;
The operator < checks if x is less than 10.
Fill both blanks to create a boolean expression that checks if num is between 1 and 10 (inclusive).
let num = 5; let in_range = num [1] 1 && num [2] 10;
The expression checks if num is greater than or equal to 1 and less than or equal to 10.
Fill all three blanks to create a boolean expression that checks if value is not equal to 0, less than 100, and greater than 50.
let value = 42; let valid = value [1] 0 && value [2] 100 && value [3] 50;
The expression checks that value is not zero, less than 100, and greater than 50.