OIM3640 - Problem Solving and Software Design

2025 Spring

Session 07 (2/11)

contain

Today's Agenda

  • Welcome/News/Announcements

Welcome/News/Announcements

  • Office Hours
    • By appointment: in-person (preferred) or Webex (please specify in email)
    • VSCode extension - Live Share
  • GenAI Policy
  • 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?

Generative AI Policy

  • AI tools like ChatGPT and Copilot can be helpful, but they are also a shortcut that prevents you from learning.
  • You may use them for generating ideas, explaining concepts, clarifying error messages, or reviewing code you've already written.
    • Be sure to acknowledge and cite any AI tools used, including the tool name and the output provided.
  • Using GenAI tools directly for exercises, homework assignments, quizzes, or similar tasks is considered an academic integrity violation.

What we have learned so far...

  • Variables, expressions, statements
  • Types: int, float, string, boolean, Nonetype, other data structures
  • Functions
    • Syntax
    • Docstrings
    • Side effects, return value(s)
    • Refactoring functions
  • import functions from another module: if __name__ == __main__:
  • turtle module
    • Try python -m turtledemo in Command Prompt/Terminal
    • Other Turtle demos

Functions

About Exercises

  • Please check your OIM3640/Issues on GitHub.
    • Reply if we need to continue the conversation.
    • Reply (with evidence) and Close if you think it is fixed.
    • If you have any question regarding
  • Suggestions / Requirements:
    • Name file/folder w/ lowercase and underscore, eg. session04/type_demo.py
    • Add docstrings for the functions your create!
    • Include the code that tests(calls) your functions!
    • Use separate files for different questions.

Turtle Exercises

Quiz 0

Session 07

- How to effectively use Google

---

# Do you *really* know how to Google? 1) Searching for *"`python -m pip install`"*? * Use *`python "-m" pip install`*, see [related discussion on Reddit](https://www.reddit.com/r/learnpython/comments/ip4uz2/what_is_m_specifically_in_python_m_pip_install/g4i67ob/) * Use logical Operators: `AND` or `+`, `OR` or `|`, `-` 2) Finding a specific file format (e.g., PDF)? * Use `filetype:`, e.g., *"`Massachusetts rental filetype:pdf`"* 3) Searching within a specific website? * Use `site:`, e.g., *"`calendar site:babson.edu`"* 4) Roll a dice? - Just Google it! 5) Try searching for "`recursion`" 6) Try `doc.new`, `slide.new`, `sheet.new`, `form.new`, `cal.new`, `site.new`, etc. 7) YouTube - [How to "Google It" like a Senior Software Engineer](https://www.youtube.com/watch?v=cEBkvm0-rg0) 8) Combine with other AI tools, such as [Perplexity](https://www.perplexity.ai/)

--- # Practice 1. **[Codingbat](http://www.codingbat.com/)** (OIM3640/[codingbat](https://github.com/OIM3640/codingbat)) 2. [Python Challange](http://www.pythonchallenge.com/) 1. [Challenge 1](http://www.pythonchallenge.com/pc/def/map.html) 3. More [learning resources](https://github.com/OIM3640/resources/blob/main/misc/README.md)

--- <style scoped> h1 { font-size: 1.5em; } </style> # Debugging 101 - What to Do When Coding Gets Tough 1) Do you understand **concepts** and **syntax** being used? 2) Have you attempted **example/demo code**? 3) Have you read **supplemental** materials? 4) Have you tried any **debugging approaches**? 5) Have you had enough **rest**? Are you feeling tired or stressed? 6) Have you asked for **help**? 1) Reach out to your peers, professors, or online communities. 2) Use AI coding assistants or tools for suggestions. 3) Remember to give credits for use of code and **cite URLs as references in comments**.

--- # Quiz 0 - Question 2

1) **Continue** working on *quiz0.py*. **DO NOT create a new file!** 2) Copy **Question 2** from [here](https://gist.githubusercontent.com/lzblack/06246db046981ff74e6476824f048000/raw/ed8a953d2d9685cb34dac741cbeedd7717c53339/quiz0_2.py). 3) Finish **Question 2** in *quiz0.py*. 4) **Commit and Push** to origin when quiz begins. 5) **Commit and Push** to origin when quiz ends. * commit message: "***Finish quiz0 Question 2***"