<!--
title: Python Programming
type: lab
duration: "01:30"
creator: Cody Soyland
-->

## ![](https://ga-dash.s3.amazonaws.com/production/assets/logo-9f88ae6c9c3871690e33280fcf557f33.png) Unit Lab: Flask!

<!--

## Overview
This lesson consists of a hands-on lab during which learners will independently create a working Python program. This lab builds on the previous lab, so starter code (which is the same solution code as the previous lab) is provided for them. You simply need to introduce the lab, make sure they have working starter code, make sure they can access the lab doc, and wait in case of questions; at the end, go over the solution (in the `solution-code` folder).

## Learning Objectives
In this lesson, students will:
- Apply what they've learned in Unit 6 (Flask) to create a working Python program.


## Duration
90 minutes

## Suggested Agenda

| Time | Activity |
| --- | --- |
| 0:00 - 0:05 | Welcome / Set up |
| 0:05 - 1:20 | Work Time |
| 1:20 - 1:30 | Q&A + Close |

## Before Class: Preparation
- Before class, complete the lab yourself to ensure you’re familiar with the solution, as well as the various challenges learners might encounter.

## In Class: Materials
- Projector
- Internet connection
- Python 3.0
- Lab directions

-->

---

## Lesson Objectives

- Apply what you’ve learned in the Flask unit to create a working Python program.
- Wrap up the Flask unit.
- Q&A and transition.


<aside class="notes">
**Talking Points**:

- Congratulate them on finishing unit 6!

</aside>

---

## You Do: Unit Lab - Flask

You already have an app that prompts a user for a movie and then, looking up that movie in the OMDB API, either prints search results or finds the Rotten Tomatoes rating.

Using what you've already built as a base, now you'll create a web app where a user can enter a movie to search for, see the results, and see the details. **Open the lab instructions in `unit-lab-5-directions`. 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.


<aside class="notes">

75 MINUTES

**Teaching Tips**:

- Make sure you change the link or point out what PDF to look at, and check the starter code location.
- Make sure all students start with working code - they can get it from the starter code file.
- The lab has instructions and an explanation in it for them to read. Make sure they're all opening the lab instructions okay.
- Stay on this slide until everyone's done or time's up!

**Talking Points**:

- Remember, throughout the course, there is a lab at the end of each unit. Each lab builds upon the last.

- Does anyone need help with the starter code?

</aside>

--

## Debrief: Unit Lab - Flask

How did it go?

Let's go over it.

Make sure you understand and your code works.

<aside class="notes">

**Talking Points**:

- Bring up the solution (in the `solution-code` directory) and walk them through it. Be sure everyone understands - and be sure everyone's code is accurate or knows that it isn't.
- The next lab builds off of this one, but provides starter code if needed.

</aside>

---

## Unit Wrap Up

What can you do?

- Basic web development:
    - Explain what front-end and back-end means.
    - Write basic HTML.
    - Write basic CSS.
- Flask:
    - Write a basic Flask application.
    - Style a Flask app.
    - Display variables on a webpage.
    - Create a route in Flask.
    - Pass variables to a template HTML document via a Flask app.
    - Create an API that makes a GET and POST request with Flask.

Questions?

<aside class="notes">

5 MINUTES

**Teaching Tips**:
- Briefly review the high-level learning objectives for the unit.
- As you read each bullet aloud, ask students to give you a "fist to five". See **Talking Points** below.
- Observe student votes for each item, and make a mental note to follow up with individuals who are not feeling confident, or find time to reteach topics that the majority of the class is uncomfortable with.
- Take time to go over questions (but remember the parking lot).

**Talking Points**:
- Wow, we've covered a lot, and we're just getting started! Let's take a minute to review what we've learned so far.
- I'm going to read through the learning objectives for Unit 1. As I do so, I want you to tell me how confident you feel that you've mastered each one, on a scale of 0 to 5.
-- Hold up your fist to indicate 0 - you don't feel confident at all that you mastered this objective.
-- Hold up all five fingers to indicate 5 - you feel super confident. You're an expert!

</aside>
