Assignment 2 - Commands, Functions, and Loops

Timeline:

  • Learn to Code - 2 weeks (weeks 3 and 4)
  • Project - 1 week (week 5)

Flow for class:

Objective: Students will be able to code a robot of their choice using swift code on the Swift Playgrounds app that demonstrates their understanding of commands, functions and loops. Students will also be able to describe how they used these elements in their code and the process they took to complete the assignment.

This assignment will be getting you familiar with Swift coding using an app called Swift Playgrounds.

First: You will complete the following sections Commands, Function and Loops sections on Swift with your group

Next: After your group completed the sections on Swift, as a group you will choose a drone or robot to program and learn its coding language on Swift by completing the robot specific activities on Swift

Then: Complete a task with a drone/robot to demonstrate your understanding of the concepts. Complete the slides presentation and submit, make sure you do the reflection part.


Project:

You and your group are tasked with coding your robot to demonstrate your understanding of commands, functions and loops. You have free reign as to what robot you want to use (you are only allowed to use each type of robot one time during the rotation) and what you want your robot to do for this assignment, but you need to have at least 1 loop and 1 function. You may include more if you choose to go for a 4 or 5. Remember, to go for a 4 you need multiple examples of the concepts and the code also needs to be the shortest code possible. For a 5 you must include the requirements for the 4 but also need to construct something that your robot uses in the code you write. If you and your group want to go for the 5, please conference with the teacher so you are able to obtain the building materials you will need.

Click on the link below for your robot or drone for instructions on the project:

We are using a Mambo Drone

We are using a Lego Mindstorms

We are using a Sphero

We are using a MeeBot

We are using Dash

Example: Assignment 2 Robot of Choice
Example: Assignment 2 - Sphero
Example: Assignment 2 : Lego Mindstorm
Example: Assignment 2 : Meebot
Example: Assignment 2 - Dash
Rubrics
Computer Coding Project Rubrics