0202

Problem 2: Decide if a Courtenay landing is safe

While on route, Mary receives a dangerous wind warning for the Courtenay area. She knows that if winds are greater than 12 knots, she can’t land safely because the Courtenay airfield is close to the ocean and has high winds. Smits Field is a nearby airfield that is protected from the wind and allows emergency landings but it’s a 30 minute drive to Courtenay and Louise would need to contact the airstrip marshall to reserve the loaner car they make available for such occasions. Write an algorithm that will tell Mary if she can land in Courtenay or if she has to go to Smits Field. (Note: you can name your variables whatever you want)

Solution (English)

  • Find out (input) the wind speed at Courtenay airport, store in variable ‘windYYC’
  • Compute if ‘windYYC’ is greater than 12 knots
  • If false, print “Courtenay Safe”
  • If true, print “Proceed to Smits Field”

Solution (flowchart)

 

Next Post →

1 Comment

  1. Yep. Nailed it.

Leave a Reply