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.9 KiB

Unit 5 Lab: Finalizing the Movie App


Lesson Objectives

  • Apply what youve learned in Unit 5 to create a working Python program.
  • Wrap up Unit 5.
  • Q&A and transition.

You Do: Unit 5 Lab — Intermediate Python

Do you remember the last unit lab? You added error-checking, string formatting, and a while loop (but not an infinite one!) — slightly restructuring the code as you went.

In this lab, you'll finish the movie app we've been working toward! You'll add an API call to actually get the Rotten Tomatoes rating, prompt a user for whether they want to search for a movie or view a rating, and read in an API key from a file.

Open the file Unit Lab 5 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 4 Lab — Carefully Adding a Bit More Logic

How did it go?

Let's go over it.

Make sure you understand and your code works — the Unit 5 lab builds off of this one!


Unit 5 Wrap-Up

What did we cover?

Scripting:

  • Write scripts that perform file I/O.
  • Write scripts that take user input.

Code abstraction:

  • Use itertools to implement efficient looping.
  • Use list comprehensions to concisely create lists.

Modules:

  • Add packages and modules to a Python program.
  • Navigate library documentation.

APIs:

  • Describe what an API is and why we might use one.
  • Call an API.

Questions?