Answers.Body: <p>I teach first/second semester students C, and what I usually do is start with rather simple tasks like finding out whether a year is a leap year, a wordcount (wc) or ls program etc.</p>
  <p>Later I progress to &quot;projects&quot;.  Most of thess---this is C after all---are simply taken from UNIX console utilities:</p>
  <ul>
  <li>nc: Connect to TCP/UDP/UNIX sockets or listen on them</li>
  <li>tar: Archive (not compress!) files.  This is actually surprisingly easy!  Bonus benefit that their archive files can be decompressed by other tar Programs!</li>
  <li>PCM picture manipulation:  PCM is a simple text based picture format.  They can build programs to manipulate saturation or invert colors and then display them in an image viewer</li>
  <li>interactive PCM picture manipulation:  The previous can be expanded, with SDL in our case, to also draw a simple GUI.</li>
  <li>snake:  Either with SDL or curses/termbox</li>
  </ul>
  <p>In my experience, all can be implemented after roughly a week.  The specific project to choose is up to themselves, they can also implement their own ideas after speaking with us.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-06T09:57:36.707Z
Answers.LastActivityDate: 2021-02-06T09:57:36.707Z
Answers.UserDisplayName: ljrk
Answers.Body: <p><strong>Sound</strong> is another subject that can be as simple or complex as you like. The format of a <a href="https://docs.fileformat.com/audio/wav/" rel="nofollow noreferrer">wav file</a> is already pretty complex. You can read the header in Python, and then decode the pcm data stream and, for example, write a new file with half the volume. It should be easy to verify by ear if your program got it right! By only reading and writing files the tricky business of handling audio hardware can be avoided.</p>
  <p>Even with this simple format, there are lots of things to try, like detecting and removing silence, or almost silence; converting stereo to mono; re-sampling at a lower rate; generating a sine wave tone at 440hz; superimposing tones; fading two files into one; calculating the average volume every 10 seconds and drawing the envelope shape down the terminal like a cash till printer; drawing a VU meter on the terminal using carriage-return to go back to the start of the line.  Perhaps you can find out how shazzam identifies music?</p>
  <p>I see there is now a Python <a href="https://docs.python.org/3/library/wave.html" rel="nofollow noreferrer">wave</a> library to simplify things once the basics have been understood.
  There is also a pyaudio library to play and record streams, and I see examples using matplotlib for the graphics, which is going a bit far. For non-dynamic output, the SVG format could be interesting, as it is directly viewable in a browser, and there are some Python libraries for it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T22:36:51.973Z
Answers.Text: Thanks, I like a multimedia approach, may try this next time. In the meantime I'd have to get more familiar with audio files and the relevant libraries myself so that I  could help students and flesh out assignments. Thanks for the suggestion.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T19:12:00.177Z
Answers.LastActivityDate: 2021-02-05T19:12:00.177Z
Answers.UserDisplayName: meuh
Answers.Body: <p>It is not said for how much time the students shall dedicate to their projects, e.g., as an exercise / lab class, or for a (perhaps multiple) week long one.  If aiming for shorter ones, I recommend to find inspiration from the sources teaching «this is the problem x, along which we develop technique y».  Seek-out for projects which may simplify the day-to-day work for the attendees.  Sources of inspiration then could be</p>
  <ul>
  <li><p>Al Sweigart's <a href="https://automatetheboringstuff.com/" rel="nofollow noreferrer"><em>Automate the Boring Stuff with Python</em></a>  (note, this is only part of a <a href="https://inventwithpython.com/" rel="nofollow noreferrer">series</a>); e.g. let Python read / write .csv, spreadsheet, word, or .pdf files; crawl web sites; initiate use of regexes</p>
  </li>
  <li><p>Ken Youens-Clark's <a href="https://www.manning.com/books/tiny-python-projects?a_aid=youens&amp;a_bid=b6485d52" rel="nofollow noreferrer"><em>Tiny Python Projects</em></a> (<a href="https://www.youtube.com/playlist?list=PLhOuww6rJJNP7UvTeF6_tQ1xcubAs9hvO" rel="nofollow noreferrer">one of his playlists</a>). Initially based on a course for attendees from biosciences, the theme in the background is how to formalize writing scripts (his <a href="https://github.com/kyclark/tiny_python_projects/blob/master/bin/new.py" rel="nofollow noreferrer">new.py</a>) once and for all, and to include automated quality control (<code>Makefile</code> and <code>pytest</code>)</p>
  </li>
  <li><p>examples of advanced tutorials on youtube, e.g., user sentdex' <a href="https://www.youtube.com/playlist?list=PLQVvvaa0QuDcOdF96TBtRtuQksErCEBYZ" rel="nofollow noreferrer"><em>Python Programming for Finance</em></a>, or Derek Bana's <a href="https://www.youtube.com/playlist?list=PLGLfVvz_LVvQjNJr85J4U_lxDg8vgqvcO" rel="nofollow noreferrer"><em>Master Statistics with Python</em></a></p>
  </li>
  </ul>
  <p>The listing above can't be exhaustive.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T14:53:38.003Z
Answers.Text: Thanks .. I'm familiar with the Sweigart book (use some of it for my own) and plan to show some of this to the students. Not familiar with the others, but will check them out.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T08:59:52.530Z
Answers.LastActivityDate: 2021-02-04T08:59:52.530Z
Answers.UserDisplayName: Buttonwood
Answers.Body: <p>Other cool game with simple logic to it would be Conway's game of life.</p>
  <p><a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-11T00:49:25.640Z
Answers.Text: That's one of my favorite games, but may be a bit beyond newbie programmers, unless I find and set up some sort of framework to visualize this and they just work with the rules.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-11T22:26:44.363Z
Answers.Text: Think console and they only need to use spaces and O, 0, or even '.' for active cells makes things much easier. Just suggest widths and heights that match the console so each refresh scrolls the old one off the screen so no clear screen is needed. If they use an array of strings the data and the visual can be the same which should make a lot more sense to them then say a boolean 2d array  and having to translate it for display. The rules for neighboring cells is much harder then displaying the results.
Answers.UserDisplayName: Dragonaire
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-10T20:48:22.843Z
Answers.LastActivityDate: 2021-02-10T20:48:22.843Z
Answers.UserDisplayName: Dragonaire
Answers.Body: <p>For simple, but interesting, problems and guidance on language use consider Downey's <a href="https://greenteapress.com/wp/think-python-2e/" rel="nofollow noreferrer">&quot;Think Python&quot;</a> (Green Tea Press, 2nd edition). Make sure to pick the second edition (Python 3), the first one is Python 2 only. The full source to the book, exercises, and other material is available for free.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-09T23:06:54.007Z
Answers.LastActivityDate: 2021-04-09T23:06:54.007Z
Answers.UserDisplayName: vonbrand
Answers.Body: <p>I know for me, personally, when I'm learning a new language, what helps me most is to have a means of collecting simple user input through a console. (Text or numbers, that's all) What this allows me to do is make simple &quot;games&quot; that don't focus a lot on graphics/presentation/game design, but rather execution. It allows me to focus on figuring out how I can use the least code possible, how I can organize data in the best ways, how to disassemble the user's input into something that my program can read/respond to, etc, etc.</p>
  <p>I recently learned Java, and mid way through learning I challenged myself to make an infinite math game. This was a game that would procedurally generate very simple math problems, solve them, present them to the player, and then compare the player's input to the solved problem. If they matched, I add to the player's score and allow them to move on, if they don't match, I end the game and present the player with their score. (And also reveal the correct answer)</p>
  <p>Then, once I was more advanced in Java, I challenged myself to make an infinite <em>word</em> game. Which was more challenging, but in all different ways. It kept it very interesting. The math game was hard to make because I had to think up a way to put together numbers + operators into a string, while also keeping them as something that Java could evaluate into an answer, however the word game was hard because I had to find a way to store many many words and pick from them randomly. Additionally, I challenged myself to allow the player to use &quot;hints&quot; to reveal a single letter of the word, and every time they used one it would reveal the next letter, in order. I also added categories and organized the words that way to add additional challenge for myself.</p>
  <p>I'm not sure these games exactly would be a good fit for you or your students (and I don't expect that they will be) but hopefully something along these lines could be very fun for them and challenge them in all the right ways. Hope this helps.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T19:43:36.903Z
Answers.LastActivityDate: 2021-02-04T19:43:36.903Z
Answers.UserDisplayName: OOPS Studio
Answers.Body: <h2>MicroPython</h2>
  <p>I'd like to suggest that you look at <a href="https://en.wikipedia.org/wiki/MicroPython" rel="nofollow noreferrer">MicroPython</a>, not because it is a subset of Python, but because it runs on a growing number of microcontrollers, and there are many complete educational projects built on them.</p>
  <p>For example, for about $9 you can get the <a href="https://m5stack.com/products/atom-matrix-esp32-development-kit" rel="nofollow noreferrer">m5atom</a> which is a read-to-use device that you can plug in to usb, where it appears as a serial port. You download a Python source file to it, and your code can draw on the led display, detect button presses, send infra-red codes, detect movement,
  listen to Bluetooth, use Wi-fi.</p>
  <p>There are many other manufacturers providing similar devices and environments, such as the new <a href="https://www.raspberrypi.org/documentation/pico/getting-started/" rel="nofollow noreferrer">Raspberry Pi Pico</a> and the BBC <a href="https://microbit.org/" rel="nofollow noreferrer">micro:bit</a>, and Adafruit (they call their version CircuitPython), for the same or even lower prices, though you don't need to buy a device per person.</p>
  <p>No need for an IDE (though I believe there are some). A simple command line program lets you talk to the python interpreter directly, or use it to download a Python file. Or some manufacturers provide an in-the-browser IDE (<a href="https://makecode.microbit.org/" rel="nofollow noreferrer">example</a>) that can simulate and/or download the resulting source into the device over usb.</p>
  <p>There is something very rewarding about seeing something physically tangible happen when you run your code.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T12:20:48.367Z
Answers.Text: Thanks for the suggestion, I will check this out, not not for them, for me for sure :) I use Thonny as the Python IDE, very highly recommended for newbie programmers, in this class which has support for MicroPython (how I heard about it in the first place). It may be too late for this term, but definitely something to consider for next time I teach this course a year from now, hopefully back on campus. I have used the Raspberry Pi before in class (more advanced elective Linux class based on group projects)
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T18:15:03.347Z
Answers.Text: I was going to add an answer much like this - consider a simple hardware-related project - especially one where with advance planning you could arrange to have already _built_ hardware - consider this [persistence-of-vision toy](https://www.instructables.com/Spinning-LED-Display/) - programmed via microprolog, you can spin it on its axis, as here, or whirl it about at the end of a string, wire wrap it to a bicycle wheel, or who knows what.  Could cost <$25 I imagine, if prebuilt there'd be no time pressure for the project on that score, fun, creative, etc. etc.
Answers.UserDisplayName: davidbak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T09:04:19.093Z
Answers.LastActivityDate: 2021-02-05T09:04:19.093Z
Answers.UserDisplayName: meuh
Answers.Body: <p><strong>Make a Snake (Python) game</strong></p>
  <p>My very first class in collage (CS) was to make a snake game.
  We got some code (like input control and rendering) and just had to connect the pieces and do some simple coding. This class was basically to get everybody comfortable with using the IDE and coding.</p>
  <p>The good thing was that those of us that found it very easy could add improvements to the game like sound and better graphics. And the teacher could concentrate on helping those that needed basic help.</p>
  <p><a href="https://en.wikipedia.org/wiki/Snake_(video_game_genre)" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Snake_(video_game_genre)</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T22:38:07.423Z
Answers.Text: I do like the idea of a project that can be continued to be improved upon by the strong students, and that's also a longer term project that can evolve during the semester. Thanks for the suggestion.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T14:48:20.497Z
Answers.LastActivityDate: 2021-02-05T14:48:20.497Z
Answers.UserDisplayName: Magnus Wittstrom
Answers.Body: <h1>Design a Vending Machine</h1>
  <p>A straight forward project that I've seen used and worked through myself is to implement a vending machine. Pretty much everyone knows how a vending machine works, so there isn't a learning curve on what the requirements are.</p>
  <p>It can be really simple, using a command line interface to enter money, select an option, and get change back.</p>
  <p>You could add basic inventory management, keeping track of how many of each item are available - even storing the current inventory in a file, giving the need to work with persisting data in a variety of file formats (simple text file, JSON/YAML)</p>
  <p>After the command line version is working, they can learn to create a GUI to represent the vending machine, using the same underlying code. This can help to discover the need to separate business logic from representation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T22:38:56.437Z
Answers.Text: Neat, thanks - I can think of a number of ways working with this project.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T14:53:41.823Z
Answers.LastActivityDate: 2021-02-05T14:53:41.823Z
Answers.UserDisplayName: selectstriker2
Answers.Body: <p>Sudoku game/solver can be a fun project. I did this in my C/C++ class but should be good for Python as well. At the same time I did a Rust version so those that might be interested could compare them ;)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-08T22:09:51.850Z
Answers.Text: I'm worried that this might be a bit too challenging of an algorithm for newbie programmers, no?
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-10T20:41:29.553Z
Answers.Text: For a student that already knows the game I don't think so. I had never tried Sudoku before but was able to have it working within a week or less. I spent more time on the visual output and input processing then the logic. They will need to understand functions and arrays so probably mid-term or later project in most classes.
Answers.UserDisplayName: Dragonaire
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-08T19:22:59.907Z
Answers.LastActivityDate: 2021-02-08T19:22:59.907Z
Answers.UserDisplayName: Dragonaire
Answers.Body: <p>Another fun game is &quot;Spelling Bee&quot; from the New York Times
  (<a href="https://www.nytimes.com/puzzles/spelling-bee" rel="noreferrer">https://www.nytimes.com/puzzles/spelling-bee</a>). You supply a file containing words. The student program reads the file and selects words that match the rules. The milestones are from a past project from Reed College.</p>
  <ol>
  <li>Print all the words that can be spelled using a fixed string (e.g. &quot;AZDIRWY&quot;). The first letter is the required letter.</li>
  <li>Prompt the user for a string and print a list of words or take the string as a command line parameter.</li>
  <li>Generate a score for each word and the total score.</li>
  <li>Generate the graphics to draw the string as it appears in the paper (six hexagons containing optional letters surrounding a central hexagon with the required letter), along with the list of words.</li>
  </ol>
  <p>You could potentially go a slightly different direction and let the python program generate HTML output and view the results in a browser. This illustrates dynamically generated HTML.</p>
  <p>Another variation would be to preprocess a &quot;dictionary&quot;, removing all words that are too short or contain more that seven distinct characters. Then create multiple files, one for each possible beginning letter. You now have cut down the search space. You might also have the students sort the answers, perhaps by word score.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T23:31:15.063Z
Answers.Text: Ah .. interesting idea, thank you, I will definitely check this out.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T19:04:47.943Z
Answers.LastActivityDate: 2021-02-04T15:43:30.137Z
Answers.LastEditDate: 2021-02-04T15:43:30.137Z
Answers.UserDisplayName: Fritz Sieker
Answers.Body: <p>Here is a concept but it works much better with visual feedback.</p>
  <h2>Simulate a Pandemic.</h2>
  <p>A pandemic requires a <em>world</em> with <em>inhabitants</em> that can be in one of several states, such as healthy, sick, dead. The pandemic spreads from sick inhabitants to &quot;neighbor&quot; inhabitants who are healthy. &quot;Dead zones&quot; stop the spread. You can also erect barriers to the spread to simulate oceans and such. People can get well or not and be reinfected or not. The pandemic can &quot;jump&quot; to simulate air travel and such.</p>
  <p>Such a thing can be highly parameterized for infection rates and everything else.</p>
  <p>A two dimensional array can represent the world and you can &quot;attach&quot; the edges in various ways to simulate a sphere or torus or möbius strip.</p>
  <p>The simulation runs through iterations.</p>
  <p>If you want to think of the whole thing as MVC, what I've described is the Model part, which normally is independent of the Views and Controllers in any case.</p>
  <p>The idea is stolen from a book, <em>Polymorphism Companion</em>, but there is enough above to build it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T23:26:22.343Z
Answers.Text: Thanks .. I'm not sure I'd want to hoist more pandemic type themed work on them give that the world around us is dealing with it. However, this reminded me of a similar project where wildfires were simulated - so very close, but different theme. Thanks for the reference too.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T23:55:22.457Z
Answers.Text: Given that some students may have lost loved ones to the coronavirus pandemic, I think this topic should be treated very sensitively if at all. Doing a similar kind of simulation task with a different context could well be a good idea.
Answers.UserDisplayName: kaya3
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T20:06:21.527Z
Answers.Text: Honestly, isn't this just putting a story behind [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)? With some probability elements added, that is.
Answers.UserDisplayName: jaskij
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T20:26:04.850Z
Answers.Text: @JanDorniak, similar, but you can make it a realistic simulation if you work at it. You can model lots of things with this basic structure.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T13:04:36.597Z
Answers.Text: This seems pretty complicated for non-CS majors with no programming background.  The concept could be fun, with a special exception for a small number of individuals (see kaya3's comment), but the problem being solved sounds really involved for something being used by a lot of the students like a 2nd year elective.
Answers.UserDisplayName: Panzercrisis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T13:08:17.940Z
Answers.Text: @Panzercrisis. Actually, once you know about two dimensional arrays, this can be built up incrementally and students can contribute ideas for the next iteration. They don't need an overall specification of some final result. Think of it as an exploration. There are more options here than I described, also, such as the possibility of a mutating virus, changing the infection probability and/or the rate of spread. It is a canvas on which to explore ideas and develop programming skill. You can even do this with a one dimensional world (or three, or ...) Lots of options.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T15:16:24.017Z
Answers.LastActivityDate: 2021-02-03T19:12:28.763Z
Answers.LastEditDate: 2021-02-03T19:12:28.763Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>As a non-CS adult, when I'm learning a new language I like to write programs to solve some of the <a href="https://projecteuler.net/archives" rel="noreferrer">Project Euler</a> problems.  Stick to the lower numbered problems and they're not too hard for non-mathematicians.</p>
  <p>For me, these problems are fun.  There is enough information given in the problems to make sure that non-mathematicians understand the goal.</p>
  <p>Good Luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T13:47:54.417Z
Answers.Text: Interesting, though it is _perhaps_ a bit to much like math. I don't like to give the students the impression, early on, that CS is just a branch of math. But, given that the OP wants to emphasize imperative programming (hmmm, why use Python) this will do the job. There is a current discussion on the SIGCSE mailing list about whether CS is a branch of engineering. It is worth a look and some thought.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T14:57:17.413Z
Answers.Text: I also enjoy Project Euler (thanks for reminding me) - perhaps one or two of those simpler problems could be appropriate. I used it to bone up on my maths, the coding was easy :) .. @Buffy Python because it's a friendly language with a low entry barrier :) , and in wide use (some of my students are interested in informatics, so that's good too). Also, I'm not so much emphasizing imperative coding,  more accurately perhaps, I just won't get too much (or perhaps at all) into the OOP aspects (though they will use objects of course).
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-06T21:38:16.237Z
Answers.Text: This is how I got started learning programming but I think the mathematical/non-programming-analysis barrier becomes prohibitive for most people relatively quickly, within fewer than say 50 problems.
Answers.UserDisplayName: Ian
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T12:44:11.247Z
Answers.LastActivityDate: 2021-02-04T12:44:11.247Z
Answers.UserDisplayName: James
Answers.Body: <p>For the imperative decision making aspects, one of the best approaches I have personally found for getting people interested is to have them write programs that <em>play</em> a game (not writing the game itself, but writing a program that can stand in for a human playing the game).</p>
  <p>This challenges them to think analytically about how the game is played, and that analytical thinking is one of the single most important things to learn to be good at programming.</p>
  <p>The card game twenty-one (blackjack/pontoon/vingt-un) is an example of an easy starting point, because:</p>
  <ul>
  <li>The rules are <em>very</em> simple, easily explained in about five minutes even to someone who has never heard of the game before.</li>
  <li>The resultant programs tend to be very compact and run very fast (meaning you can run each student’s program hundreds of thousands of times to get a good idea of how it performs). It’s actually possible to write a basic AI for twenty-one in only a few dozen lines of code.</li>
  <li>A simple but near optimal strategy comes intuitively to most people (namely, keep taking new cards until you are at or above a specific value (most people tend to prefer somewhere around 18) and then pass).</li>
  <li>A truly optimal strategy requires actually evaluating what the other players have and figuring out the probability of taking a new card putting you over 21 based on that.</li>
  </ul>
  <p>From there, you can branch out into other simple games. Card games tend to work very well for this because they force the students to account for basic probability to have their program do well, but also generally require more than just probability for an optimal strategy.</p>
  <p>With a bit of extra prep-work, you can even set this up as a ‘tournament’ type thing (ideally not affecting grades, because that gives a bit of an unfair advantage to those who have the skills to figure out a truly optimal strategy) as a way to encourage those in the class who enjoy competition.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T13:45:32.247Z
Answers.Text: I'm a big believer in "extra prep work". I normally provide some scaffolding for projects, especially important ones.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T13:30:38.213Z
Answers.LastActivityDate: 2021-02-04T13:48:02.563Z
Answers.LastEditDate: 2021-02-04T13:48:02.563Z
Answers.UserDisplayName: Austin Hemmelgarn
Answers.Body: <p>At my institution, we (often) take our courses' final products in a different direction: free choice, working as a pair (or in a trio).</p>
  <p>Students write 2 to 3 ideas (&quot;proposals&quot;) within a google doc, and then talk among themselves to find projects that seem like a good fit.</p>
  <p>They then write up short proposals, and divide tasks into &quot;must-have for a minimum viable product&quot;, &quot;important&quot;, and &quot;nice-to-have&quot;.  We added this step after years of watching some subset of students get completely lost in the weeds.  We came to call them the &quot;font color&quot; students, and we found that having that list upfront enables us to point back to it and redirect the students towards the most important parts of the project.</p>
  <p>They have a few weeks to work when the teachers walk around the room offering support, and then they give a final presentation.</p>
  <p>The final product is not a huge portion of the grade, because a fair number of the projects don't quite come together.  We consider that developmentally appropriate; students are very poor at gauging how much they can get done in 2 weeks and how long things will take.  Free projects also force students to explore new avenues, and we did not want to penalize such explorations, as learning how to wrap your brain around new libraries and new challenges is both hard and virally important.</p>
  <p>Instead, the students give a presentation on what they wanted to produce and what libraries they used, and then they demo what they have and reflect on what went well and what could have gone better.  Personally, I also add in a requirement that students show us one interesting thing in their code, though my colleagues do not do this. In any case, the presentations are a lot of fun, and some number of the projects are always very impressive.  It's a fun way to end a course on a nice, uplifting note.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T23:24:13.020Z
Answers.Text: I believe this approach would be an option once COVID times are over, thank you for sharing.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T20:42:04.773Z
Answers.LastActivityDate: 2021-02-03T20:42:04.773Z
Answers.UserDisplayName: Ben I.
Answers.Body: <h1>Python turtle</h1>
  <p>Related to what their major is if you can find something relevant else
  <code>import turtle</code> # this module allows some visual output, that can be interesting, and gives good feedback.</p>
  <h1>Jupiter notebooks / google colab notebook.</h1>
  <p>It allows you to create pages using markdown (same as this site), and to incorporate python code, tables, and charts. Tables can be input or output, charts are output, there are other inputs such as sliders. This is good for any one with a scientific interest, as they can continue using it in their major.</p>
  <h1>Linguistic analysis / text generation</h1>
  <p>Write a program to create writing in the style of. You can do this with a 2 stage markov chain (a what?). You just generate a table containing the probability of the next word. e.g. for the short phrase &quot;the cat sat on the mat&quot;, both &quot;cat&quot; and &quot;mat&quot; have a 0.5 probability of following a &quot;the&quot;. With a long enough training text, you can get it to generate its own texts.</p>
  <p>You will have to write the program for them, or at least partly. What you write must work, but not be complete, so that they can add to it. But now I am digressing onto an answer for another question.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T12:58:09.523Z
Answers.Text: I appreciate the suggestion re Turtle graphics, I have to think about it, my initial reaction is that this would be more age appropriate to younger students (these are undergrads, so 18 - 20) though I guess it could be used to help demonstrate concepts,  looping and writing functions come to mind.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T14:27:58.693Z
Answers.Text: I added two more suggestions. I agree that the turtle may be better of younger students. The hard bit is finding something relevant (and this depends on their interests), so maybe a mixture of things.
Answers.UserDisplayName: ctrl-alt-delor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T23:30:13.523Z
Answers.Text: Thanks for expanding on your answer. The Jupyter notebook is something I hope to introduce them to at some point toward the end of the course, esp since it is relatively easy to plot data in the notebook and visualize it. Maybe scikit  has something I can use for the text based idea, I'll have to check it out.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T01:57:51.880Z
Answers.Text: @Levon For an intro to programming course, you probably don't want to assume much about the level of understanding of the students - particularly if they're coming from other majors. At least a few weeks covering basics like loops/functions is almost a must. An intro course I took (as a CS major, but other majors were in the class) used Python and had us use Turtle to draw a variety of country flags in the second week, and some people did struggle with that. Depending on what majors are included in your class, some may never have written a line of code in their lives.
Answers.UserDisplayName: Kayndarr
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-04T19:38:54.460Z
Answers.Text: @Kayndarr Yes I agree that you must start at the beginning. The trick is choosing the correct beginning.
Answers.UserDisplayName: ctrl-alt-delor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-03T10:13:43.547Z
Answers.LastActivityDate: 2021-02-03T14:26:30.287Z
Answers.LastEditDate: 2021-02-03T14:26:30.287Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p><strong>Web scraping</strong> is a vast domain that might interest students. Python is great for string matching (the power of regular expressions!), for parsing HTML  (or XML or JSON) into structures that are so much more simple to manipulate.</p>
  <p>There are even sites that provide APIs to help. The Python <a href="https://praw.readthedocs.io/en/latest/getting_started/quick_start.html" rel="nofollow noreferrer">Praw</a> library allows you to wander down Reddit pages your students may already be reading, using just a few lines of code.</p>
  <p>There are <a href="https://wiki.python.org/moin/RssLibraries" rel="nofollow noreferrer">RSS parsers</a> to be constantly in the know, with many site providing RSS feeds.</p>
  <p>From there, you can progress to <a href="https://selenium-python.readthedocs.io/getting-started.html" rel="nofollow noreferrer">selenium</a> to show how bots click buttons for you, and can warp reality into the fake world we see, with so little effort.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T12:18:47.710Z
Answers.Text: Thanks for the suggestion, I already showed them some simple code to automate the opening of some web sites for them, this may fit nicely with this.
Answers.UserDisplayName: Levon
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T14:09:49.240Z
Answers.Text: Note about parsing HTML with regular expressions: https://stackoverflow.com/a/1732454/2436687 
  
  It's good enough for playing and learning regexes, but for more serious uses, Python has a HTML parser in the standard library.
Answers.UserDisplayName: user31389
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-05T11:27:41.980Z
Answers.LastActivityDate: 2021-02-05T11:27:41.980Z
Answers.UserDisplayName: meuh
Body: <p>I'm teaching an undergrad Intro to Programming for Non-majors this semester (in Python) and I'm looking for some fun projects for my students that are engaging but not too difficult for them. This is my first go around with this course.</p>
  <p>I've looked at their majors to see if I could come up with projects that might relate to it, but that didn't spark any ideas.</p>
  <p>Maybe some games, like Tic-Tac-Toe? Does anyone have suggestions that have worked well for them?</p>
  <p><strong>Update</strong>: These are typical undergrad students at a US university, so about 18 - 22 year olds, with no programming background. The main focus is on imperative rather than OOP. In the past I haven't found an easy way to introduce graphics with Python or GUIs, but perhaps there's some nice stuff out there now. I don't think Turtle graphics would hold their attention very much or very long, also seems more age appropriate to younger students I believe.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T03:50:16.707Z
Comments.Text: What material do you cover in the course?  How old are the students?  Is the main focus of the course on OOP, or on imperative programming rudiments?
Comments.UserDisplayName: Ben I.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T10:44:51.447Z
Comments.Text: Are you teaching graphics also?
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T12:54:46.283Z
Comments.Text: @BenI. I added an update above, but they are typical undergrads (18 - 22'ish), we'll be focusing on the imperative coding aspects of the language, I just want them to acquire some basic competency with coding, including reading/writing simple text files (and csv).
Comments.UserDisplayName: Levon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T12:56:23.337Z
Comments.Text: @Buffy I'm not currently planning to cover graphics, but if there's a nice easy way to create GUIs in Python or do some basic graphics I think it would be good and engaging (I'm only aware of pygame, but I haven't looked at GUIs or graphics in quite a while).
Comments.UserDisplayName: Levon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T13:00:50.587Z
Comments.Text: graphics is a lot harder in Python than in Java. Let me think about how an idea would work without graphics.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T13:10:38.210Z
Comments.Text: @Buffy Thanks, I appreciate it  ... that's one area where I think Python falls short. I love the language otherwise, it's my own go-to language to use for coding. C# does it really easy and well, and students like putting together programs with GUIs.
Comments.UserDisplayName: Levon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T13:13:54.750Z
Comments.Text: I've used Tcl/Tk bindings with Python, but it is painful.
Comments.UserDisplayName: Buffy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T14:30:58.603Z
Comments.Text: @Buffy Yes I have used Tcl/Tk and it is beautiful. But when doing it in python, it feels like it does not know what it wants to be (half TCL, half Python, half fly).
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T14:32:17.570Z
Comments.Text: Is SDL any good in python? It is not a widget based system, but good for games.
Comments.UserDisplayName: ctrl-alt-delor
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-03T23:21:23.467Z
Comments.Text: @Buffy Ugh .. yes, I have used Tcl/Tk with Python before too, not going to subject these newbie coders to it .. trying to get them to possibly consider the major, not run away from it  :)
Comments.UserDisplayName: Levon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T06:34:49.347Z
Comments.Text: @Levon You may check this https://realpython.com/tutorials/projects/ I got some ideas from here https://realpython.com/intermediate-python-project-ideas/
Comments.UserDisplayName: Qiulang 邱朗
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T11:51:28.513Z
Comments.Text: Back in the 80s, at high school, we had Commodore PETs.  By the end of the 1st semester, I had managed to create a very simple, but playable 'breakout' game, in BASIC.   We weren't able to save our programs, so every week, I had to type the program in again from memory.  By the end of the term, I was able to type it in, and then play it for 5 minutes before the end of the 30 minute lesson. 'Graphics' doesn't have to mean 3d rendered artwork.  Just moving a letter 'O' and '-----'  around a console window is graphical enough to play breakout.
Comments.UserDisplayName: Neil
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-04T21:42:59.743Z
Comments.Text: If you give up GUI and settle on 2D graphics with manually generated RGB, you can do something quite easily if you provide your students with a basic `pygame` structure. Take a look [here](https://gitlab.com/-/snippets/2071525) - my code is pretty much lines 15-30, rest is taken from SO answers. I've programmed for a few years already, but have almost no Python experience. Total time taken: ~2 hours.
Comments.UserDisplayName: jaskij
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-05T03:26:27.103Z
Comments.Text: Have them code something in BrainFuck.
Comments.UserDisplayName: SpiderRico
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-05T20:44:26.800Z
Comments.Text: Seconding Pygame for graphics, it's pretty easy AND teaches you much, much more about programming and graphics then a gui tool.
Comments.UserDisplayName: Erik
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-06T12:49:29.653Z
Comments.Text: I did taught programming in Python, and we *asked* students to propose their project ideas
Comments.UserDisplayName: Basile Starynkevitch
Tags: <lesson-ideas><student-motivation><programming>
Title: What are some fun projects for non-CS majors?
ThreadText: # What are some fun projects for non-CS majors?
  
  (Asked by: username_0 on 2021-02-03)
  
  I'm teaching an undergrad Intro to Programming for Non-majors this semester (in Python) and I'm looking for some fun projects for my students that are engaging but not too difficult for them. This is my first go around with this course.
  
  I've looked at their majors to see if I could come up with projects that might relate to it, but that didn't spark any ideas.
  
  Maybe some games, like Tic-Tac-Toe? Does anyone have suggestions that have worked well for them?
  
  **Update**: These are typical undergrad students at a US university, so about 18 - 22 year olds, with no programming background. The main focus is on imperative rather than OOP. In the past I haven't found an easy way to introduce graphics with Python or GUIs, but perhaps there's some nice stuff out there now. I don't think Turtle graphics would hold their attention very much or very long, also seems more age appropriate to younger students I believe.
  
  **Tags:** lesson-ideas, student-motivation, programming
  
  > **Comments:**
  > **username_1**: What material do you cover in the course?  How old are the students?  Is the main focus of the course on OOP, or on imperative programming rudiments?  
  > **username_2**: Are you teaching graphics also?  
  > **username_0**: @BenI. I added an update above, but they are typical undergrads (18 - 22'ish), we'll be focusing on the imperative coding aspects of the language, I just want them to acquire some basic competency with coding, including reading/writing simple text files (and csv).  
  > **username_0**: @username_2 I'm not currently planning to cover graphics, but if there's a nice easy way to create GUIs in Python or do some basic graphics I think it would be good and engaging (I'm only aware of pygame, but I haven't looked at GUIs or graphics in quite a while).  
  > **username_2**: graphics is a lot harder in Python than in Java. Let me think about how an idea would work without graphics.  
  > **username_0**: @username_2 Thanks, I appreciate it  ... that's one area where I think Python falls short. I love the language otherwise, it's my own go-to language to use for coding. C# does it really easy and well, and students like putting together programs with GUIs.  
  > **username_2**: I've used Tcl/Tk bindings with Python, but it is painful.  
  > **username_3**: @username_2 Yes I have used Tcl/Tk and it is beautiful. But when doing it in python, it feels like it does not know what it wants to be (half TCL, half Python, half fly).  
  > **username_3**: Is SDL any good in python? It is not a widget based system, but good for games.  
  > **username_0**: @username_2 Ugh .. yes, I have used Tcl/Tk with Python before too, not going to subject these newbie coders to it .. trying to get them to possibly consider the major, not run away from it  :)  
  > **username_4**: @username_0 You may check this https://realpython.com/tutorials/projects/ I got some ideas from here https://realpython.com/intermediate-python-project-ideas/  
  > **username_5**: Back in the 80s, at high school, we had Commodore PETs.  By the end of the 1st semester, I had managed to create a very simple, but playable 'breakout' game, in BASIC.   We weren't able to save our programs, so every week, I had to type the program in again from memory.  By the end of the term, I was able to type it in, and then play it for 5 minutes before the end of the 30 minute lesson. 'Graphics' doesn't have to mean 3d rendered artwork.  Just moving a letter 'O' and '-----'  around a console window is graphical enough to play breakout.  
  > **username_6**: If you give up GUI and settle on 2D graphics with manually generated RGB, you can do something quite easily if you provide your students with a basic `pygame` structure. Take a look [here](https://gitlab.com/-/snippets/2071525) - my code is pretty much lines 15-30, rest is taken from SO answers. I've programmed for a few years already, but have almost no Python experience. Total time taken: ~2 hours.  
  > **username_7**: Have them code something in BrainFuck.  
  > **username_8**: Seconding Pygame for graphics, it's pretty easy AND teaches you much, much more about programming and graphics then a gui tool.  
  > **username_9**: I did taught programming in Python, and we *asked* students to propose their project ideas  
  
  ---
  
  ## 17 answers
  
  ### Answer by username_19 on 2021-02-03. Score: 11
  
  Another fun game is "Spelling Bee" from the New York Times
  (<https://www.nytimes.com/puzzles/spelling-bee>). You supply a file containing words. The student program reads the file and selects words that match the rules. The milestones are from a past project from Reed College.
  
  1. Print all the words that can be spelled using a fixed string (e.g. "AZDIRWY"). The first letter is the required letter.
  2. Prompt the user for a string and print a list of words or take the string as a command line parameter.
  3. Generate a score for each word and the total score.
  4. Generate the graphics to draw the string as it appears in the paper (six hexagons containing optional letters surrounding a central hexagon with the required letter), along with the list of words.
  
  You could potentially go a slightly different direction and let the python program generate HTML output and view the results in a browser. This illustrates dynamically generated HTML.
  
  Another variation would be to preprocess a "dictionary", removing all words that are too short or contain more that seven distinct characters. Then create multiple files, one for each possible beginning letter. You now have cut down the search space. You might also have the students sort the answers, perhaps by word score.
  
  > **Comments:**
  > **username_0**: Ah .. interesting idea, thank you, I will definitely check this out.  
  
  ---
  
  ### Answer by username_2 on 2021-02-03. Score: 10
  
  Here is a concept but it works much better with visual feedback.
  
  ## Simulate a Pandemic.
  
  A pandemic requires a *world* with *inhabitants* that can be in one of several states, such as healthy, sick, dead. The pandemic spreads from sick inhabitants to "neighbor" inhabitants who are healthy. "Dead zones" stop the spread. You can also erect barriers to the spread to simulate oceans and such. People can get well or not and be reinfected or not. The pandemic can "jump" to simulate air travel and such.
  
  Such a thing can be highly parameterized for infection rates and everything else.
  
  A two dimensional array can represent the world and you can "attach" the edges in various ways to simulate a sphere or torus or möbius strip.
  
  The simulation runs through iterations.
  
  If you want to think of the whole thing as MVC, what I've described is the Model part, which normally is independent of the Views and Controllers in any case.
  
  The idea is stolen from a book, *Polymorphism Companion*, but there is enough above to build it.
  
  > **Comments:**
  > **username_0**: Thanks .. I'm not sure I'd want to hoist more pandemic type themed work on them give that the world around us is dealing with it. However, this reminded me of a similar project where wildfires were simulated - so very close, but different theme. Thanks for the reference too.  
  > **username_20**: Given that some students may have lost loved ones to the coronavirus pandemic, I think this topic should be treated very sensitively if at all. Doing a similar kind of simulation task with a different context could well be a good idea.  
  > **username_6**: Honestly, isn't this just putting a story behind [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)? With some probability elements added, that is.  
  > **username_2**: @JanDorniak, similar, but you can make it a realistic simulation if you work at it. You can model lots of things with this basic structure.  
  > **username_21**: This seems pretty complicated for non-CS majors with no programming background.  The concept could be fun, with a special exception for a small number of individuals (see username_20's comment), but the problem being solved sounds really involved for something being used by a lot of the students like a 2nd year elective.  
  > **username_2**: @username_21. Actually, once you know about two dimensional arrays, this can be built up incrementally and students can contribute ideas for the next iteration. They don't need an overall specification of some final result. Think of it as an exploration. There are more options here than I described, also, such as the possibility of a mutating virus, changing the infection probability and/or the rate of spread. It is a canvas on which to explore ideas and develop programming skill. You can even do this with a one dimensional world (or three, or ...) Lots of options.  
  
  ---
  
  ### Answer by username_22 on 2021-02-04. Score: 7
  
  As a non-CS adult, when I'm learning a new language I like to write programs to solve some of the [Project Euler](https://projecteuler.net/archives) problems. Stick to the lower numbered problems and they're not too hard for non-mathematicians.
  
  For me, these problems are fun. There is enough information given in the problems to make sure that non-mathematicians understand the goal.
  
  Good Luck!
  
  > **Comments:**
  > **username_2**: Interesting, though it is _perhaps_ a bit to much like math. I don't like to give the students the impression, early on, that CS is just a branch of math. But, given that the OP wants to emphasize imperative programming (hmmm, why use Python) this will do the job. There is a current discussion on the SIGCSE mailing list about whether CS is a branch of engineering. It is worth a look and some thought.  
  > **username_0**: I also enjoy Project Euler (thanks for reminding me) - perhaps one or two of those simpler problems could be appropriate. I used it to bone up on my maths, the coding was easy :) .. @username_2 Python because it's a friendly language with a low entry barrier :) , and in wide use (some of my students are interested in informatics, so that's good too). Also, I'm not so much emphasizing imperative coding,  more accurately perhaps, I just won't get too much (or perhaps at all) into the OOP aspects (though they will use objects of course).  
  > **username_23**: This is how I got started learning programming but I think the mathematical/non-programming-analysis barrier becomes prohibitive for most people relatively quickly, within fewer than say 50 problems.  
  
  ---
  
  ### Answer by username_24 on 2021-02-04. Score: 4
  
  For the imperative decision making aspects, one of the best approaches I have personally found for getting people interested is to have them write programs that *play* a game (not writing the game itself, but writing a program that can stand in for a human playing the game).
  
  This challenges them to think analytically about how the game is played, and that analytical thinking is one of the single most important things to learn to be good at programming.
  
  The card game twenty-one (blackjack/pontoon/vingt-un) is an example of an easy starting point, because:
  
  * The rules are *very* simple, easily explained in about five minutes even to someone who has never heard of the game before.
  * The resultant programs tend to be very compact and run very fast (meaning you can run each student’s program hundreds of thousands of times to get a good idea of how it performs). It’s actually possible to write a basic AI for twenty-one in only a few dozen lines of code.
  * A simple but near optimal strategy comes intuitively to most people (namely, keep taking new cards until you are at or above a specific value (most people tend to prefer somewhere around 18) and then pass).
  * A truly optimal strategy requires actually evaluating what the other players have and figuring out the probability of taking a new card putting you over 21 based on that.
  
  From there, you can branch out into other simple games. Card games tend to work very well for this because they force the students to account for basic probability to have their program do well, but also generally require more than just probability for an optimal strategy.
  
  With a bit of extra prep-work, you can even set this up as a ‘tournament’ type thing (ideally not affecting grades, because that gives a bit of an unfair advantage to those who have the skills to figure out a truly optimal strategy) as a way to encourage those in the class who enjoy competition.
  
  > **Comments:**
  > **username_2**: I'm a big believer in "extra prep work". I normally provide some scaffolding for projects, especially important ones.  
  
  ---
  
  ### Answer by username_1 on 2021-02-03. Score: 3
  
  At my institution, we (often) take our courses' final products in a different direction: free choice, working as a pair (or in a trio).
  
  Students write 2 to 3 ideas ("proposals") within a google doc, and then talk among themselves to find projects that seem like a good fit.
  
  They then write up short proposals, and divide tasks into "must-have for a minimum viable product", "important", and "nice-to-have". We added this step after years of watching some subset of students get completely lost in the weeds. We came to call them the "font color" students, and we found that having that list upfront enables us to point back to it and redirect the students towards the most important parts of the project.
  
  They have a few weeks to work when the teachers walk around the room offering support, and then they give a final presentation.
  
  The final product is not a huge portion of the grade, because a fair number of the projects don't quite come together. We consider that developmentally appropriate; students are very poor at gauging how much they can get done in 2 weeks and how long things will take. Free projects also force students to explore new avenues, and we did not want to penalize such explorations, as learning how to wrap your brain around new libraries and new challenges is both hard and virally important.
  
  Instead, the students give a presentation on what they wanted to produce and what libraries they used, and then they demo what they have and reflect on what went well and what could have gone better. Personally, I also add in a requirement that students show us one interesting thing in their code, though my colleagues do not do this. In any case, the presentations are a lot of fun, and some number of the projects are always very impressive. It's a fun way to end a course on a nice, uplifting note.
  
  > **Comments:**
  > **username_0**: I believe this approach would be an option once COVID times are over, thank you for sharing.  
  
  ---
  
  ### Answer by username_3 on 2021-02-03. Score: 3
  
  # Python turtle
  
  Related to what their major is if you can find something relevant else
  `import turtle` # this module allows some visual output, that can be interesting, and gives good feedback.
  
  # Jupiter notebooks / google colab notebook.
  
  It allows you to create pages using markdown (same as this site), and to incorporate python code, tables, and charts. Tables can be input or output, charts are output, there are other inputs such as sliders. This is good for any one with a scientific interest, as they can continue using it in their major.
  
  # Linguistic analysis / text generation
  
  Write a program to create writing in the style of. You can do this with a 2 stage markov chain (a what?). You just generate a table containing the probability of the next word. e.g. for the short phrase "the cat sat on the mat", both "cat" and "mat" have a 0.5 probability of following a "the". With a long enough training text, you can get it to generate its own texts.
  
  You will have to write the program for them, or at least partly. What you write must work, but not be complete, so that they can add to it. But now I am digressing onto an answer for another question.
  
  > **Comments:**
  > **username_0**: I appreciate the suggestion re Turtle graphics, I have to think about it, my initial reaction is that this would be more age appropriate to younger students (these are undergrads, so 18 - 20) though I guess it could be used to help demonstrate concepts,  looping and writing functions come to mind.  
  > **username_3**: I added two more suggestions. I agree that the turtle may be better of younger students. The hard bit is finding something relevant (and this depends on their interests), so maybe a mixture of things.  
  > **username_0**: Thanks for expanding on your answer. The Jupyter notebook is something I hope to introduce them to at some point toward the end of the course, esp since it is relatively easy to plot data in the notebook and visualize it. Maybe scikit  has something I can use for the text based idea, I'll have to check it out.  
  > **username_25**: @username_0 For an intro to programming course, you probably don't want to assume much about the level of understanding of the students - particularly if they're coming from other majors. At least a few weeks covering basics like loops/functions is almost a must. An intro course I took (as a CS major, but other majors were in the class) used Python and had us use Turtle to draw a variety of country flags in the second week, and some people did struggle with that. Depending on what majors are included in your class, some may never have written a line of code in their lives.  
  > **username_3**: @username_25 Yes I agree that you must start at the beginning. The trick is choosing the correct beginning.  
  
  ---
  
  ### Answer by username_11 on 2021-02-05. Score: 3
  
  **Web scraping** is a vast domain that might interest students. Python is great for string matching (the power of regular expressions!), for parsing HTML (or XML or JSON) into structures that are so much more simple to manipulate.
  
  There are even sites that provide APIs to help. The Python [Praw](https://praw.readthedocs.io/en/latest/getting_started/quick_start.html) library allows you to wander down Reddit pages your students may already be reading, using just a few lines of code.
  
  There are [RSS parsers](https://wiki.python.org/moin/RssLibraries) to be constantly in the know, with many site providing RSS feeds.
  
  From there, you can progress to [selenium](https://selenium-python.readthedocs.io/getting-started.html) to show how bots click buttons for you, and can warp reality into the fake world we see, with so little effort.
  
  > **Comments:**
  > **username_0**: Thanks for the suggestion, I already showed them some simple code to automate the opening of some web sites for them, this may fit nicely with this.  
  > **username_26**: Note about parsing HTML with regular expressions: https://stackoverflow.com/a/1732454/2436687   It's good enough for playing and learning regexes, but for more serious uses, Python has a HTML parser in the standard library.  
  
  ---
  
  ### Answer by username_10 on 2021-02-06. Score: 2
  
  I teach first/second semester students C, and what I usually do is start with rather simple tasks like finding out whether a year is a leap year, a wordcount (wc) or ls program etc.
  
  Later I progress to "projects". Most of thess---this is C after all---are simply taken from UNIX console utilities:
  
  * nc: Connect to TCP/UDP/UNIX sockets or listen on them
  * tar: Archive (not compress!) files. This is actually surprisingly easy! Bonus benefit that their archive files can be decompressed by other tar Programs!
  * PCM picture manipulation: PCM is a simple text based picture format. They can build programs to manipulate saturation or invert colors and then display them in an image viewer
  * interactive PCM picture manipulation: The previous can be expanded, with SDL in our case, to also draw a simple GUI.
  * snake: Either with SDL or curses/termbox
  
  In my experience, all can be implemented after roughly a week. The specific project to choose is up to themselves, they can also implement their own ideas after speaking with us.
  
  
  ---
  
  ### Answer by username_11 on 2021-02-05. Score: 2
  
  **Sound** is another subject that can be as simple or complex as you like. The format of a [wav file](https://docs.fileformat.com/audio/wav/) is already pretty complex. You can read the header in Python, and then decode the pcm data stream and, for example, write a new file with half the volume. It should be easy to verify by ear if your program got it right! By only reading and writing files the tricky business of handling audio hardware can be avoided.
  
  Even with this simple format, there are lots of things to try, like detecting and removing silence, or almost silence; converting stereo to mono; re-sampling at a lower rate; generating a sine wave tone at 440hz; superimposing tones; fading two files into one; calculating the average volume every 10 seconds and drawing the envelope shape down the terminal like a cash till printer; drawing a VU meter on the terminal using carriage-return to go back to the start of the line. Perhaps you can find out how shazzam identifies music?
  
  I see there is now a Python [wave](https://docs.python.org/3/library/wave.html) library to simplify things once the basics have been understood.
  There is also a pyaudio library to play and record streams, and I see examples using matplotlib for the graphics, which is going a bit far. For non-dynamic output, the SVG format could be interesting, as it is directly viewable in a browser, and there are some Python libraries for it.
  
  > **Comments:**
  > **username_0**: Thanks, I like a multimedia approach, may try this next time. In the meantime I'd have to get more familiar with audio files and the relevant libraries myself so that I  could help students and flesh out assignments. Thanks for the suggestion.  
  
  ---
  
  ### Answer by username_12 on 2021-02-04. Score: 2
  
  It is not said for how much time the students shall dedicate to their projects, e.g., as an exercise / lab class, or for a (perhaps multiple) week long one. If aiming for shorter ones, I recommend to find inspiration from the sources teaching «this is the problem x, along which we develop technique y». Seek-out for projects which may simplify the day-to-day work for the attendees. Sources of inspiration then could be
  
  * Al Sweigart's [*Automate the Boring Stuff with Python*](https://automatetheboringstuff.com/) (note, this is only part of a [series](https://inventwithpython.com/)); e.g. let Python read / write .csv, spreadsheet, word, or .pdf files; crawl web sites; initiate use of regexes
  * Ken Youens-Clark's [*Tiny Python Projects*](https://www.manning.com/books/tiny-python-projects?a_aid=youens&a_bid=b6485d52) ([one of his playlists](https://www.youtube.com/playlist?list=PLhOuww6rJJNP7UvTeF6_tQ1xcubAs9hvO)). Initially based on a course for attendees from biosciences, the theme in the background is how to formalize writing scripts (his [new.py](https://github.com/kyclark/tiny_python_projects/blob/master/bin/new.py)) once and for all, and to include automated quality control (`Makefile` and `pytest`)
  * examples of advanced tutorials on youtube, e.g., user sentdex' [*Python Programming for Finance*](https://www.youtube.com/playlist?list=PLQVvvaa0QuDcOdF96TBtRtuQksErCEBYZ), or Derek Bana's [*Master Statistics with Python*](https://www.youtube.com/playlist?list=PLGLfVvz_LVvQjNJr85J4U_lxDg8vgqvcO)
  
  The listing above can't be exhaustive.
  
  > **Comments:**
  > **username_0**: Thanks .. I'm familiar with the Sweigart book (use some of it for my own) and plan to show some of this to the students. Not familiar with the others, but will check them out.  
  
  ---
  
  ### Answer by username_13 on 2021-02-10. Score: 2
  
  Other cool game with simple logic to it would be Conway's game of life.
  
  <https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life>
  
  > **Comments:**
  > **username_0**: That's one of my favorite games, but may be a bit beyond newbie programmers, unless I find and set up some sort of framework to visualize this and they just work with the rules.  
  > **username_13**: Think console and they only need to use spaces and O, 0, or even '.' for active cells makes things much easier. Just suggest widths and heights that match the console so each refresh scrolls the old one off the screen so no clear screen is needed. If they use an array of strings the data and the visual can be the same which should make a lot more sense to them then say a boolean 2d array  and having to translate it for display. The rules for neighboring cells is much harder then displaying the results.  
  
  ---
  
  ### Answer by username_14 on 2021-04-09. Score: 1
  
  For simple, but interesting, problems and guidance on language use consider Downey's ["Think Python"](https://greenteapress.com/wp/think-python-2e/) (Green Tea Press, 2nd edition). Make sure to pick the second edition (Python 3), the first one is Python 2 only. The full source to the book, exercises, and other material is available for free.
  
  
  ---
  
  ### Answer by username_15 on 2021-02-04. Score: 1
  
  I know for me, personally, when I'm learning a new language, what helps me most is to have a means of collecting simple user input through a console. (Text or numbers, that's all) What this allows me to do is make simple "games" that don't focus a lot on graphics/presentation/game design, but rather execution. It allows me to focus on figuring out how I can use the least code possible, how I can organize data in the best ways, how to disassemble the user's input into something that my program can read/respond to, etc, etc.
  
  I recently learned Java, and mid way through learning I challenged myself to make an infinite math game. This was a game that would procedurally generate very simple math problems, solve them, present them to the player, and then compare the player's input to the solved problem. If they matched, I add to the player's score and allow them to move on, if they don't match, I end the game and present the player with their score. (And also reveal the correct answer)
  
  Then, once I was more advanced in Java, I challenged myself to make an infinite *word* game. Which was more challenging, but in all different ways. It kept it very interesting. The math game was hard to make because I had to think up a way to put together numbers + operators into a string, while also keeping them as something that Java could evaluate into an answer, however the word game was hard because I had to find a way to store many many words and pick from them randomly. Additionally, I challenged myself to allow the player to use "hints" to reveal a single letter of the word, and every time they used one it would reveal the next letter, in order. I also added categories and organized the words that way to add additional challenge for myself.
  
  I'm not sure these games exactly would be a good fit for you or your students (and I don't expect that they will be) but hopefully something along these lines could be very fun for them and challenge them in all the right ways. Hope this helps.
  
  
  ---
  
  ### Answer by username_11 on 2021-02-05. Score: 1
  
  ## MicroPython
  
  I'd like to suggest that you look at [MicroPython](https://en.wikipedia.org/wiki/MicroPython), not because it is a subset of Python, but because it runs on a growing number of microcontrollers, and there are many complete educational projects built on them.
  
  For example, for about $9 you can get the [m5atom](https://m5stack.com/products/atom-matrix-esp32-development-kit) which is a read-to-use device that you can plug in to usb, where it appears as a serial port. You download a Python source file to it, and your code can draw on the led display, detect button presses, send infra-red codes, detect movement,
  listen to Bluetooth, use Wi-fi.
  
  There are many other manufacturers providing similar devices and environments, such as the new [Raspberry Pi Pico](https://www.raspberrypi.org/documentation/pico/getting-started/) and the BBC [micro:bit](https://microbit.org/), and Adafruit (they call their version CircuitPython), for the same or even lower prices, though you don't need to buy a device per person.
  
  No need for an IDE (though I believe there are some). A simple command line program lets you talk to the python interpreter directly, or use it to download a Python file. Or some manufacturers provide an in-the-browser IDE ([example](https://makecode.microbit.org/)) that can simulate and/or download the resulting source into the device over usb.
  
  There is something very rewarding about seeing something physically tangible happen when you run your code.
  
  > **Comments:**
  > **username_0**: Thanks for the suggestion, I will check this out, not not for them, for me for sure :) I use Thonny as the Python IDE, very highly recommended for newbie programmers, in this class which has support for MicroPython (how I heard about it in the first place). It may be too late for this term, but definitely something to consider for next time I teach this course a year from now, hopefully back on campus. I have used the Raspberry Pi before in class (more advanced elective Linux class based on group projects)  
  > **username_16**: I was going to add an answer much like this - consider a simple hardware-related project - especially one where with advance planning you could arrange to have already _built_ hardware - consider this [persistence-of-vision toy](https://www.instructables.com/Spinning-LED-Display/) - programmed via microprolog, you can spin it on its axis, as here, or whirl it about at the end of a string, wire wrap it to a bicycle wheel, or who knows what.  Could cost <$25 I imagine, if prebuilt there'd be no time pressure for the project on that score, fun, creative, etc. etc.  
  
  ---
  
  ### Answer by username_17 on 2021-02-05. Score: 1
  
  **Make a Snake (Python) game**
  
  My very first class in collage (CS) was to make a snake game.
  We got some code (like input control and rendering) and just had to connect the pieces and do some simple coding. This class was basically to get everybody comfortable with using the IDE and coding.
  
  The good thing was that those of us that found it very easy could add improvements to the game like sound and better graphics. And the teacher could concentrate on helping those that needed basic help.
  
  <https://en.wikipedia.org/wiki/Snake_(video_game_genre)>
  
  > **Comments:**
  > **username_0**: I do like the idea of a project that can be continued to be improved upon by the strong students, and that's also a longer term project that can evolve during the semester. Thanks for the suggestion.  
  
  ---
  
  ### Answer by username_18 on 2021-02-05. Score: 1
  
  # Design a Vending Machine
  
  A straight forward project that I've seen used and worked through myself is to implement a vending machine. Pretty much everyone knows how a vending machine works, so there isn't a learning curve on what the requirements are.
  
  It can be really simple, using a command line interface to enter money, select an option, and get change back.
  
  You could add basic inventory management, keeping track of how many of each item are available - even storing the current inventory in a file, giving the need to work with persisting data in a variety of file formats (simple text file, JSON/YAML)
  
  After the command line version is working, they can learn to create a GUI to represent the vending machine, using the same underlying code. This can help to discover the need to separate business logic from representation.
  
  > **Comments:**
  > **username_0**: Neat, thanks - I can think of a number of ways working with this project.  
  
  ---
  
  ### Answer by username_13 on 2021-02-08. Score: 1
  
  Sudoku game/solver can be a fun project. I did this in my C/C++ class but should be good for Python as well. At the same time I did a Rust version so those that might be interested could compare them ;)
  
  > **Comments:**
  > **username_0**: I'm worried that this might be a bit too challenging of an algorithm for newbie programmers, no?  
  > **username_13**: For a student that already knows the game I don't think so. I had never tried Sudoku before but was able to have it working within a week or less. I spent more time on the visual output and input processing then the logic. They will need to understand functions and arrays so probably mid-term or later project in most classes.  
  
  ---
  
  