OIM3640 - Problem Solving and Software Design

2025 Spring

Session 21 (4/10)

contain

Today's Agenda

  • Welcome/News/Announcements
  • A Quick Crash Course on HTML & CSS
  • Flask Practice
    • Getting input from users using HTML forms
    • Integrating APIs

Welcome/News/Announcements

  • Assignments/Project:
    • Assignment 3 (Web App)
    • Project Proposal (due 4/12, Saturday)
  • Next Class: Working on Assignment 3. Please sit in project groups.
  • Communications
    • Meet with me in person during office hours at least once this semester.
    • Email - specify course # in subject title, e.g., "OIM3640: GitHub settings"
    • Use Slack/GitHub when asking code-related questions

What we have learned so far...

  • Variables, Expressions, Statements
  • Types: int, float, string, boolean, Nonetype, string, list, dictionary, tuple, set, ...
  • Functions
  • Conditionals
  • Iterations
  • Pseudo-code
  • APIs
  • Error Handling: try...except
  • Debugging
  • Building Web Application using Flask

A Quick Crash Course on HTML & CSS

Flask Resources

Flask Practice: Building a Weather Page

  • In your helloflask project/folder, add a new web page, weather.html
  • In app.py, add a route that allows user to enter a US city name and display the current temperature.
  • Discussion:
    • How would you handle an international city?
    • What if the city name is not found?
    • How would you handle multiple cities?

Flask Exercise: API Integration

--- # Working on [Assignment 3](https://github.com/OIM3640/WebApp-MBTA) 1. Q & A - [MBTA API](https://api-v3.mbta.com/docs/swagger/index.html#/Stop/ApiWeb_StopController_index) 2. Read project instructions 3. **Work in Groups:** - Discuss plan - Clarify scope - Ask questions - Write code