Save this video free

Python (Fall 2026) Module 9-7: S9 Explanation

Bill Moseley, Ph.D. - Computer Science Educator · 3:43 · Watch on YouTube

Part of Bakersfield College COMP B10. See all 47 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Bill Moseley explains the S9 Python sandbox assignment: build an algorithm that ranks three passages about the phases of the Moon, written at fourth-grade, 10th-grade, and PhD levels. He suggests measurable features (including average word length, unique-word count, sentence length, and punctuation) and frames the task as practice turning a problem into a coded solution.

Key takeaways

Chapters

0:00 S9 Assignment: Rank Three Moon-Phase Passages
1:10 Measure Word Choice, Sentence Length, and Punctuation
2:16 Use the Text Analysis Task to Practice Algorithmic Thinking

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:01 S9 for the sandbox assignment. It's pretty  straightforward. But I think it is useful, which is why I assigned it in the first  place. Be kind of stupid if I assigned things that weren't useful. But what I have  here for S9 is kind of an interesting problem, I think. I've created three very similar passages  of text written at different grade levels. I have a fourth grade level, a 10th grade level, and  a PhD level. They're all about the same thing. They're all about the phases of the moon. And  what I want you to do is I want you to create an algorithm that will rate these. Now, that doesn't  have to say fourth grade, 10th grade, and PhD level. Your algorithm could spit out a number,  say like 100, 150, 250 or something like that,

0:57 just some indication that it recognizes that this  one is more advanced than this one, and this one is more advanced than this one. So what you have  to do is you have to think about things that you can measure in those texts that might tell you if  a fourth grader or a PhD is doing the writing. So, what you might expect from a fourth grader  is maybe shorter words, simpler sentences, shorter sentences. PhD is going to probably  have more word variety. So, a, a, a larger number of different words. You're going to expect  probably more uses of like commas and semicolons in a PhD over a fourth grader. So, those are  all things. Average word length, word variety,

1:49 all of those things you can, you can measure  by breaking up these sentences and analyzing the words. You can measure the average length. You  can measure how many different words there are by removing the duplicates and then counting. Right?  So, if I, if I break these down into individual

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, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.