Swift

Solution - Are you truly free yet?

Our solution to the mini-project

Our Solution

Here is our solution. Your solution does not have to look like ours. If it works and is concise, then you’ve done it right!

var age = 17 // Give any value you like and test your program.
var completed_course = false // Give any value to this as well! You can keep testing with different values
if age >= 15 && completed_course {
    print("You are ready to be free! Congratulations!")
}
if age < 15 {
    print("You are not old enough to hop into the driver's seat yet. Wait a few years and you'll be ready!!!")
}
if !completed_course {
    print("You should probably get that drivers' ed course done if you want to drive ;). It's important, and will take some effort, but with determination, you can get through and you'll be ready for 'freedom'")
}    

Feel free to contact us if you have any questions.

chevron_up