fn car_quality (miles: u32) -> (String, u32) {

    // Declare and initialize the return tuple value
    // For a new car, set the miles to 0
    // Corrected code: Use the "mut" keyword so quality can be changed later
    let mut quality: (String, u32) = ("New".to_string(), 0);

    // Use a conditional expression to check the miles
    // If the car has accumulated miles, then the car is used
    if miles > 0 {
        // Corrected code: Set the quality value for a used car
        quality = ("Used".to_string(), miles);
    }

    // Corrected code: Return the completed tuple, no semicolon needed
    return quality
}
// Get the car quality by testing the value of the input argument
// - miles (u32)
// Create a tuple for the car quality with the age ("New" or "Used") and miles
// Return a tuple with the arrow `->` syntax
Get the car quality by testing the value of the input argument
miles (u32)
Create a tuple for the car quality with the age ("New" or "Used") and miles
Return a tuple with the arrow `->` syntax
Get the car quality by testing the value of the input argument miles ( u32 ) Create a tuple for the car quality with the age ( " New " or " Used " ) and miles Return a tuple with the arrow ` - > ` syntax
fn car_quality (miles: u32) -> (String, u32) {
    // Declare and initialize the return tuple value
    // For a new car, set the miles to 0
    // Corrected code: Use the "mut" keyword so quality can be changed later
    let mut quality: (String, u32) = ("New".to_string(), 0);
    // Use a conditional expression to check the miles
    // If the car has accumulated miles, then the car is used
    if miles > 0 {
        // Corrected code: Set the quality value for a used car
        quality = ("Used".to_string(), miles);
    }
    // Corrected code: Return the completed tuple, no semicolon needed
    return quality
}
fn car_quality ( miles : u32 ) -> ( String , u32 ) { // Declare and initialize the return tuple value // For a new car, set the miles to 0 // Corrected code: Use the "mut" keyword so quality can be changed later let mut quality : ( String , u32 ) = ( " " . to_string ( ) , 0 ) ; // Use a conditional expression to check the miles // If the car has accumulated miles, then the car is used if miles > 0 { // Corrected code: Set the quality value for a used car quality = ( " " . to_string ( ) , miles ) ; } // Corrected code: Return the completed tuple, no semicolon needed return quality }
Get the car quality by testing the value of the input argument
 miles (u32)
Create a tuple for the car quality with the age ("New" or "Used") and miles
Return a tuple with the arrow `->` syntax
Get the car quality by testing the value of the input argument miles ( u32 ) Create a tuple for the car quality with the age ( " New " or " Used " ) and miles Return a tuple with the arrow ` - > ` syntax
miles
u32
miles
u32