Skip to content

Instantly share code, notes, and snippets.

@olearydj
olearydj / insy3010-spr24-project-notes.md
Last active April 26, 2024 14:18
insy3010-spr24-project-notes.md

INSY 3010 Spr24 Project Notes

I will add notes about the project here to address any issues that come up and provide support code that may be helpful to you. Check back frequently!

Miscellaneous Clarifications

  • The sample event data provided in the instructions isn't quite accurate. The event names include numbers. I later eliminated this from the data but neglected to update the sample. Here is the corrected sample:

| Participant | Phase | Event | Start | Duration | Notes |

@olearydj
olearydj / ma-dice-roll.md
Last active November 30, 2023 18:34
ma-dice-roll.md

Dice Roll Function

During our discussion yesterday we developed this solution to the dice roll function:

def sim_dice_roll(num_sides, num_dice):
	"""This implementation is incorrect."""
	low = num_dice
	high = num_dice * num_sides
@olearydj
olearydj / 3010-fall-23-project-notes.md
Last active November 30, 2023 19:23
3010-fall-23-project-notes.md

Project Notes

INSY 3010, Fall 2023

I will update this periodically during the week to share answers to common questions / problems encountered.

General

Important Note:

@olearydj
olearydj / f23-python-hw2-pseudocode.md
Created September 24, 2023 15:33
f23-python-hw2-pseudocode.md

Fall 2023 Python HW2 Pseudocode

Problem Statement

Develop the pseudocode to solve the following problem.

You are a student with a variety of subjects to study. Each subject requires a different amount of time and effort based on its difficulty and importance. Your task is to create a weekly study schedule that assigns study times for each subject every day.

Consider the following:

@olearydj
olearydj / 3010-fall23-hw2.md
Last active September 12, 2023 21:11
3010-fall23-hw2.md

3010 Fall 23 - HW2

This task is part of your HW2 assignment. See Canvas for details of the other requirements for this assignment.

Purpose

In this module, students delve into a hands-on exploration of the MusicBrainz API using Python. APIs form the backbone of much of today's digital infrastructure. Leveraging Python's clear syntax and extensive libraries, one can interact with these APIs in an efficient and straightforward manner. Upon completion of this task, students will:

  • Appreciate Python's capability to automate tasks with concise and intuitive code.
@olearydj
olearydj / exam-solutions.md
Last active May 7, 2023 22:45
exam-solutions.md

Python Final Exam Review and Discussion

I've heard comments that the exam was very hard. I'm going to post solutions and demonstrate that it was all pulled from material that we covered this semester. More importantly, it was all based on patterns that you were previously graded on. No trick problems or other curveballs were thrown.

The following fundamental concepts of Python were covered:

  • get input and print output
  • ints, floats, strings, lists and dictionaries
  • looping and branching
  • commonly used object methods like str.islower() and list.append()
  • indexing
@olearydj
olearydj / L11 - SQL Queries.md
Created April 28, 2023 13:30
L11 - SQL Queries.md

L12 - SQL Queries

For most of units 10 and 11, ICEs were handled with paper handouts. The solutions to those can be found in the key PDFs.

ICE Group 1 - Inner Joins

12.17 Lesson Schedule with Inner Join

Use explicit syntax.

SELECT LessonDateTime, HorseID, FirstName, LastName
@olearydj
olearydj / project_tips.md
Last active April 28, 2023 15:32
project_tips.md

Final Project Tips

INSY 3010 Spring 2023

Part 1

There are two common sources of problems with this lab. They relate to errant whitespacing (i.e., extra, missing, or misplace spaces and/or newlines) and code structure.

Errant Whitespacing

The Lab does not clearly define where all whitespace should be found, especially between functions (after output, before menu, etc.). That, combined with the sometimes confusing output of the autograder, makes it difficult to locate and correct these errors. To help with that I've provided a complete log of the expected output. Run your code as follows and compare output to help identify deviations.

@olearydj
olearydj / Lab20-2 Pseudocode.md
Last active April 10, 2023 17:32
Lab20-2 Pseudocode.md

Lab 21.2 - Movie Show Time Display, Pseudocode

There are a couple of ways to approach this.

Parse Then Print

One is to read through the file once to parse the data and collect the show times, then print the result in a second loop. For that method, consider building a dictionary where the key is the movie title and the value is a list of [rating, [times]]. Or a nested dictionary:

movies = {
    "Halloween": {
@olearydj
olearydj / Lab9-13.md
Last active April 4, 2023 18:51
Lab9-13.md

Lab 9.13 - Thesaurus

The instructions for this lab are a little confusing. To be clear:

  • first, build a dictionary from the loaded file
  • then, check the dictionary for the given letter and, if it exists, print all the values associated

See the comments below for "pseudocode".

synonyms = {}   # Define dictionary