OIM3640 - Problem Solving and Software Design

2025 Spring

Session 03 (1/28)

contain

Today's Agenda

  • Welcome/News/Announcements
  • Class Review
  • Lecture:
    • Variables, expressions and statements

Welcome/News/Announcements

  • Class GitHub:
  • Make sure you are using Python 3.13.1 in VSCode.
    • You can uninstall other installed Python versions if they are not needed.
  • 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
  • Questions?

How to Ask Questions via Slack/GitHub/Email

  • What were you trying to do?
    • The problem and context
  • What did you do?
    • Any relevant code snippets, or GitHub link to the code
  • What did you expect to happen?
  • What actually happened?
    • Screenshots or descriptions of any strange behavior or errors
    • Any relevant debug console or terminal output, such as error messages

Quick Quiz

  1. What Python errors have we seen?
    1. NameError
    2. SyntaxError
    3. ...
  2. Does 2++2 cause an error?
  3. How about 2+02?
  4. What does 13 % 4 do?

Exercises

  • All feedback will be provided in the GitHub Issues section of your oim3640 repo - Regularly check the Issues section on your GitHub repository.
    • Reply if further discussion is needed.
    • Reply with evidence and close the issue if you believe it is resolved.
  • Requirements/Suggestions:
    • Naming files/folders:
      • Use lowercase, e.g., session03
      • Use underscores, e.g., demo_types.py
    • Add comments appropriately to enhance readability.

Debugging

  • Errors/Issues
    • print(16.1/(42.7))
    • print ((10 / 1.61) / (42 / 60 + 42 / 60 / 60))
  • Format your code in VSCode
    • Alt + Shift + F (or ⌥ Option + Shift + F on MacOS)
      • or right-click and select Format Document
      • or open the Command Palette with Ctrl + Shift + P (or ⌘ Command + Shift + F on MacOS) and type Format Document
    • You may need to install VSCode extension - Black Formatter

Lecture

global styles