In this challenge, you will create a function that determines the characteristics of a given number. Specifically, the function will evaluate whether a number is positive negative, or zero and also determine if it is even or odd.

Rust's powerful control flow mechanisms, including if, else if, and else statements, make it easy to handle multiple conditions. By combining these conditions with logical operators, you can create a function that provides comprehensive information about the number.

You are given a function describe_number(n: i32) -> String that takes an integer as input and returns a string description of the number's characteristics. The description should include whether the number is positive, negative, or zero and whether it is even or odd.

For example:

"Positive even"

"Positive odd"

"Negative even"

"Negative odd"

"Zero"

Complete the function by implementing the necessary conditions and logical checks.

Remember that the modulus operator % can help determine if a number is even or odd.

Logical operators && and || will be useful for combining conditions.

Consider the order of your conditions to ensure the correct output.

Editor not available on Mobile!

In order to solve the challenge, please visit this page on a desktop computer.

Determine Number Characteristics

In this challenge, you will create a function that determines the characteristics of a given number. Specifically, the function will evaluate whether a number is positive negative, or zero and also determine if it is even or odd.

Rust's powerful control flow mechanisms, including if, else if, and else statements, make it easy to handle multiple conditions. By combining these conditions with logical operators, you can create a function that provides comprehensive information about the number.

You are given a function describe_number(n: i32) -> String that takes an integer as input and returns a string description of the number's characteristics. The description should include whether the number is positive, negative, or zero and whether it is even or odd.

For example:

"Positive even"

"Positive odd"

"Negative even"

"Negative odd"

"Zero"

Complete the function by implementing the necessary conditions and logical checks.