ME2120 - Fall 2025
Overview
Professor Ryan C. Cooper demonstrates how to complete and submit Homework 0 for ME2120 using a Jupyter notebook launched through HuskyCT and nanoHUB. He applies Python and NumPy to box-volume and shipping checks, models a chair slowing under friction, improves plots, explains how to disclose Copilot-generated assistance, and exports the work as a PDF for submission.
Key takeaways
- Jupyter's Shift+Enter runs the current cell, while Alt+Enter runs it and opens a new cell, making both useful for notebook-based engineering work.
- Sorting both dimension arrays before comparison checks whether a 12.5 by 11 by 14-inch box can fit within a 15 by 13 by 12-inch shipping limit in any orientation.
- A friction model must stop applying sliding deceleration when velocity reaches zero; otherwise, the computed chair position incorrectly reverses direction.
- When a graph combines position in meters and speed in meters per second, axis labels and a legend are necessary to distinguish the quantities clearly.
- AI-generated code can support the assignment, but students should verify that it matches the physical problem and document the AI tool and prompt in a Markdown cell.
- A Jupyter notebook can be exported through Print Preview and Ctrl+P as a PDF, then uploaded to the Homework 0 submission area in HuskyCT; corrected work can be submitted again.
Chapters
- Ryan C. Cooper introduces Homework 0, which practices producing a PDF from a Jupyter notebook.
- Students can open the dynamics tool through the homework page or the syllabus in HuskyCT.
- The notebook workflow prepares students for additional Jupyter work in Module 2.
- First-time nanoHUB users can sign in with Google or create an account; institutional credits are not supported.
- The Getting Started with Python, Module 0 notebook contains the Homework 0 exercises.
- In Jupyter, Shift+Enter runs a cell, while Alt+Enter runs a cell and creates a new one.
- The example box has dimensions 12.5 by 11 by 14 inches, so Python can calculate its volume and density from a 31-pound weight.
- Print statements make results and units explicit; a format such as .3f limits a density result to three decimal places.
- NumPy arrays let students compare box dimensions with a 15 by 13 by 12-inch shipping limit, sorting dimensions first to account for orientation.
- A box is ready to ship only when all three dimension checks and the weight check, 31 pounds less than 35 pounds, pass.
- The physics example models a chair sliding along a floor with friction coefficient mu = 0.1 and initial speed 3 m/s.
- Cooper defines initial position x0 = 0 and gravitational acceleration g = 9.81 m/s², with Python comments used to record units.
- A time array from 0 to 5 seconds with 51 points supports calculating and plotting position and velocity.
- The chair's velocity follows v(t) = v0 - mu*g*t, while its position calculation includes the one-half factor in the constant-acceleration term.
- A first position plot shows unrealistic backward travel because the model continues applying sliding friction after the chair stops.
- Boolean indexing selects values where velocity is at least zero, helping identify the forward motion and the stop time.
- The notebook can hold position at its maximum once velocity reaches zero, producing a stationary chair rather than continued backward motion.
- Cooper adds time and measurement labels to plots, distinguishing chair position in meters from speed in meters per second.
- Plotting position and speed together can confuse the vertical axis because the quantities have different units.
- A legend identifies the two plotted lines, using labels such as chair position and chair speed.
- Cooper prompts Copilot for help adding a legend, then uses only the relevant labeling suggestion rather than copying unrelated generated code.
- The generated response includes an inappropriate spring-and-sine-wave example, illustrating why code must be checked against the actual friction problem.
- Students may use AI-generated code, but should document the tool and prompt in a Markdown cell so Cooper and the teaching assistants can understand how to help.
- The assignment evaluates understanding of the physics, not simply the ability to write Python from scratch.
- After reviewing the notebook, Cooper uses Print Preview and Ctrl+P to save the work as a PDF.
- The PDF preserves calculations, graphs, code, and the Markdown note documenting Copilot use.
- Students upload the PDF through Module 0, Homework 0, Submit Homework 0 in HuskyCT.
- HuskyCT accepts another submission if a student needs to correct or add material; Cooper demonstrates uploading a second PDF.
- Students do not need to save submission receipts as proof of a successful upload.
- If stuck, students should note what help they need and make a specific plan, such as asking during Friday's lecture and submitting Friday afternoon.
- Cooper closes by noting that the class will return to the classroom Friday for more dynamics work.
Transcript excerpt
0:07 Hey, I'm checking to make sure we have sound and video. Hey, I'm checking to make sure we have Looks like things are going pretty well so far. Keep this one up. I'll keep chat kind of over to the side. And yeah, we'll close this for now. Uh, so afternoon. Thanks for joining live stream or for watching this at another time. I appreciate it. Um, things come up. It's part of being a dad, but my son isn't feeling well, so I had to stay home. My wife is off at work
0:56 and that's where we're at. And last week before the three-day break, before our our one break of the semester, we were going to look at homework zero, but we didn't we didn't get to it. So, that's okay. We'll work on this today. Um, so if you look at homework zero on our main like web page and here I'll pull up HuskyCT log in come courses 2120 just so you can see like same thing. So, here we're getting started. Um,
1:46 quiz zero we took a look at last week and now we're at homework zero. Main goal is get a PDF of your work in this is called a Jupyter notebook. And um I I just wanted to get used to this because when we get into like module two, we'll be looking at more Jupyter notebooks. Um, so anyway, if if you're in the homework, you can click on this Jupiter hub or if you come into the syllabus, one of the first links that you see is our dynamics tool. So, we can launch this tool. And the first time you try this, um, let's close out these.
2:44 So, it's redirecting. And while it's doing that, I'll show you So first time it'll tell you like you
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Professor Ryan C. Cooper.