Complete the code to declare a constant named MAX_SCORE with value 100.
const MAX_SCORE: i32 = [1];Constants in Rust are declared with const and must have a value assigned. Here, 100 is the correct value.
Complete the code to declare a constant PI with type f64 and value 3.14.
const PI: [1] = 3.14;
i32 for a decimal number.The constant PI is a floating-point number, so its type should be f64.
Fix the error in the constant declaration by completing the code.
const GREETING: &str = [1];String literals in Rust must be enclosed in double quotes. So "Hello" is correct.
Fill both blanks to declare a constant named SPEED_LIMIT of type u32 with value 60.
const SPEED_LIMIT: [1] = [2];
i32 when unsigned is better here.The constant SPEED_LIMIT should have type u32 (unsigned 32-bit integer) and value 60 without quotes.
Fill all three blanks to declare a constant named AUTHOR with type &str and value "Alice".
const [1]: [2] = [3];
The constant name is AUTHOR, its type is &str for string slice, and the value is the string literal "Alice".