let mut password_strength_checker = |password: string| -> string { let mut score = 0; for char in password.chars() { if char.is_alphanumeric() { score += 1; } else if char.is_special_character() { score += 2; } } let details = "using a mix of characters increases your password strength."; let preexplanation = "before we begin from zero, understand the importance of a strong password."; if score < 10 { "your password is considered weak, please include more varied characters. ".to_string() + &details + " " + &preexplanation } else { "congratulations, your password strength is adequate!".to_string() + " remember, slight changes can significantly enhance security." } };