Learn to program

  Finch assignments ::

Learning Goal: Understand how to write a program to control a robot, using loops, conditionals and subroutines where appropriate.



Finch Assignment 12 - Conditional Statements (If-Then)

Learning goal: understand the use of conditional statements in a program.

You need to know how to branch in a program, so you can have different results depending on different inputs.

For example, you could program the robot to do different actions when it is light, compared to when it is dark.



Watch these videos to find out about If-Then (conditional) statements.

This one is a little long, but is a great review, and uses Python 2.

Everyone should watch these:

Python If

Python If-Else

Python If - Elif - Else


Assignment 12

Write a program to ask the user what color they prefer. Give a choice of three colors.

Have the robot do a different action based on each of the three colors.

If you want to have a set of possible options you can use the if...in statement.


Turn it in to Shared - Students - Pereira - A.I 201x - Class color - Finch - If as ifyourname.

Write a Reflection on what you have learned.