You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4.6 KiB

Unit 2 Lab: Control Flow


Lesson Objectives

  • Apply what youve learned in Unit 2 to create a working Python program.
  • Wrap up Unit 2 (woohoo!).
  • Q&A and transition.

You Do: Unit 2 Lab - Control Flow

Do you remember the first unit lab? You have a print statement to show the user a movie title and rating.

In today's lab, you will use functions, if statements, and loops. By the end, your movie app will print a movie title, a movie rating, or both, depending on a string value.

Open the file unit-lab-2-directions to see the lab and its instructions. Follow the instructions there.

  • If your solution to the last lab didn't quite work, there's working code provided in the starter-code folder. Copy that to your local folder and work from there.

Try your best! Raise your hand if you really need help.


Debrief: Unit 2 Lab - Control Flow

How did it go?

Let's go over it.

Make sure your code works - the Unit 3 lab builds off this one!


Unit 2 Wrap Up

What'd we cover?

  • Conditionals and Boolean Values
  • Lists - append, len, pop, and insert.
  • Loops - for loops, while loops, and range.
  • Functions - including parameters and return statements.
  • Function arguments - *args, kwargs, and **kwargs

Questions?