Written by Eva Yeung of BSD Education
Find the project solutions below
- Conditional statements
Before starting the project, engage your class by initiating a discussion by asking:
- What do you already know about AI – Artificial Intelligence?
- Can you predict how robots will change our world?
- What are the advantages and disadvantages of self-driving cars?
- Which parts of school do you think robots will take over first? What are the benefits and risks?
- What does AI mean for jobs in the future?
- Can robots be creative? (Watch “Can robots be creative?” by Gil Weinberg on TedEd)
If you want to take this project further, you can learn more about AI by using these video resources:
- “What is Artificial Intelligence (or Machine Learning)?” by HubSpot (Video duration: 6 minutes and 14 seconds)
- “Machine Learning & Artificial Intelligence: Crash Course Computer Science #34” by CrashCourse (Video duration: 11 minutes and 50 seconds)
Objective: get the car started:
Solution: engineOn(); drive();
Objective: get the car to speed up:
Solution: + accelerate();
Objective: avoid going over the speed limit:
Solution: if speed >= limit cruise();
Objective: stop at red light and go at green light.
Objective: turn right at next road with junction
Solution: if atConjunction(): turn(nextDirection)