<h1>On command line</h1>
<p>To make command line programs make sense, you need to first teach Unix (Or another OS with a workable command line: VMS, Amiga-dos, sorry I can't think of any others that are still relevant).</p>
<p>When one can see the value in a powerful command line, where one can complete tasks much more quickly and with less pain, then it becomes obvious why one would write ones own command line programs.</p>
<h1>On GUI</h1>
<p>Yes for graphical programming, but this is not GUI programming.</p>
<p>I have used python turtle, it aids learning because it gives immediate feedback. I have used it to teach the basics, in schools. It could also be used to teach algorithms: First teach basics, then add drawing of data sets, then …</p>
<h1>UnPlugged</h1>
<p>Also consider teaching some of it unplugged. You can teach algorithms, by having the students be the data, by having a student direct, by having a student explain, by using props e.g. backs of cards, white boards, paper, mini-whiteboards, …</p>
<p>See <a href="https://csunplugged.org/en/" rel="nofollow noreferrer">https://csunplugged.org/en/</a> for some ideas. This site is aimed at primary school teachers, but most of it can be adapted.</p>

CC BY-SA 4.0
2019-01-13T16:40:37.853Z
2019-01-13T16:40:37.853Z
2020-06-18T08:36:57.023Z
ctrl-alt-delor
<p>There is little point these days in making a GUI program, except in the most rare cases, especially with Python. In the age of the internet, most programs are best served as web apps. I expect this will be most relevant to your students' interests as well. For Python I would suggest starting with Flask or Django. There are good Django tutorials here:</p>

<ul>
<li><p><a href="https://docs.djangoproject.com/en/2.1/intro/tutorial01/" rel="nofollow noreferrer">https://docs.djangoproject.com/en/2.1/intro/tutorial01/</a></p></li>
<li><p><a href="https://tutorial.djangogirls.org/en/" rel="nofollow noreferrer">https://tutorial.djangogirls.org/en/</a></p></li>
</ul>

<p>And I like this Flask one:</p>

<ul>
<li><a href="https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world" rel="nofollow noreferrer">https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world</a></li>
</ul>

<p>All of these should show you how to make a basic app, which has a GUI in the form of a web interface.</p>

<p>You might also consider something more visual in the form of basic data analysis and plotting with Jupyter notebooks.</p>

CC BY-SA 4.0
2019-01-12T17:57:33.637Z
This requires the students to understand all kinds of web techniques, most notably HTTP and HTML, which might be too advanced for freshmen students (without being the actual subject of the course). It makes more sense at a later stage of the curriculum when they already learned about network stuff.
Bergi
CC BY-SA 4.0
2019-01-12T21:22:16.850Z
How is a web app not a GUI? The client is quite graphic usually.
Mast
CC BY-SA 4.0
2019-01-13T04:05:00.180Z
@mast with Python? the web app would be a GUI app (if its actually an app not an interface) but its not event driven like a standalone GUI app would be (or rather to make it event driven you would have to switch to Javascript) - so it would end up not teaching the students the same lessons (or language). I wouldn't say standalone GUIs are rare - remember cell phone games and tools as well as office applications are still typically stand-alones. Just depends on the field (like I will probably never write another serious webapp but GUIs? yeah, all the time in C# with python backend)
LinkBerest - SO sold our work
CC BY-SA 4.0
2019-01-13T10:58:17.113Z
@JGreenwell thats what I was getting at. Creating the actual GUI for those apps is often not done with Python. The skills to build a web app may be outside the scope of a freshman curriculum, but you should not forget that this is probably why those students signed up for Computer Science in the first place; to learn mainstream app building techniques. I doubt they signed up because they wanted to learn algorithms. And both Flask and Django are easy enough to learn from the tutorials I posted, I taught myself both using these.
user5359531
CC BY-SA 4.0
2022-03-18T21:37:35.483Z
Back-end web gives a pretty poor coolness-to-difficulty ratio needed to keep new learners engaged. Data persistence isn't interesting until one has already created a front-end game or todo list and wants to keep a high score table (and localStorage isn't exciting any more) or add multiplayer features. This lack of visual options (aside from turtle) is part of why I find Python to be a less engaging language for new students than JS/HTML5.
ggorlen
CC BY-SA 4.0
2019-01-12T12:52:18.573Z
2019-01-12T13:08:12.530Z
2019-01-12T13:08:12.530Z
user5359531
<p>I teach event-driven GUI programming in Java.  This requires machinery. First of all, students need to be good at writing functions and procedural programs. Secondly, they need to understand polymorphism and inheritance, as these are vital tools.  So, we are beyond the range of beginners here. </p>

<p>However, if you teaching Java, GUIs are a compelling use case for the whole inheritance mechanism.  Java8 lambdas make the writing of callbacks simpler and more fun.  I use the JavaFX framework for this purpose. If you are doing this in java11, it is tricky to get set up and configured.</p>

<p>I don't see this as a game for novices.</p>

CC BY-SA 4.0
2019-01-16T19:35:07.240Z
2019-01-16T19:35:07.240Z
ncmathsadist
<p>Unfortunately, GUI programming is sufficiently different from algorithmic programming that if you start with it students can get the wrong idea about what a program should look like. </p>

<p>For example, when I write an algorithmic program, using good OO techniques, a method of five lines is starting to be too long. The granularity of a good OO program can be very small with the complexity in the interactions between objects rather than in the methods themselves. </p>

<p>But GUI programs typically have long and boring methods that are mostly just messages to library code, rather than being interesting in themselves. </p>

<p>On the other hand, with some preparation, you can/should provide a framework in which the students can work, so that they don't start with an empty page and nothing but language features. You provide a library tailored for their education. Your library can contain the GUI code and they build the algorithms to fit it. </p>

<p>Back in the 1980's the book <em>Karel the Robot</em> by Richard Pattis did a similar thing for structured programming in Pascal. He provided a simulator along with the GUI code. Students wrote programs to make a robot do interesting things. By "interesting", I mean that the system was Turing Complete, so that, in theory, any program could be written within the framework. It actually used a very small, Pascal-like, language with only a few primitives. Students didn't actually program with integers and strings, but with the primitive elements of the simulation. But, Turing Complete. </p>

<p>Karel the Robot has been updated to modern OO standards and versions exist for Java, Python, and Ruby. The Java version has been used for APCS courses and in college level courses as well. </p>

<p>For Java, there is a special resource called the <a href="https://greenroom.greenfoot.org" rel="noreferrer">Greenroom</a> that provides many other teacher-written simulation frameworks in which the students program. I don't know of a similar resource for Python, but you could, perhaps tailor some of the ideas there to Python. </p>

CC BY-SA 4.0
2019-01-13T04:31:29.017Z
I've used [hour of code](https://hourofcode.com/ca/learn) for tools similar to the Greenroom (there are some college level materials and some of the games are great practice sessions for college students, think 15-20 min instead of 4x45 minute lessons) - I've specifically used [these games](https://codecombat.com/teachers/hour-of-code) to teach event-driven programming for a web/phone based course I helped with
LinkBerest - SO sold our work
CC BY-SA 4.0
2019-01-11T21:15:39.247Z
2019-01-11T21:15:39.247Z
Buffy
<p>In my experience, good introductory programming courses meet three overarching goals:</p>

<ol>
<li><strong>Empower</strong> students to create simple programs outside of the scope of the class by giving them the technical skills and the practice to begin being independent. This includes teaching the basics of one usable language. </li>
<li><strong>Inspire</strong> students to continue learning and using their skills once the class ends (independently and/or by signing up for the next class in the sequence).</li>
<li><strong>Prepare</strong> students for the next step in their learning. In many cases, this means that certain topics and concepts must be covered so that students can enter the next class at the correct level. It should also include giving students practice with the skills needed for basic independent learning including debugging, googling to find solutions to problems, and initial exposure to reading and utilizing documentation.</li>
</ol>

<p>It sounds like you have seen issues with goal number two, where your students do not feel inspired. However, I am concerned that introducing your introductory students to GUI building right off the bat will jeopardize goal number one. GUI has a lot of overhead, and as you said, your students will not understand what they are doing and will be frustrated by their inability to build anything without heavy guidance/pre-built pieces.</p>

<p>My suggestion is to strike a middle balance. Have them build command line applications that they fully understand, but that are interesting or useful in some way. Better yet, give them some choice in which projects to tackle so that they are more invested.</p>

<p>Here are some neat things that students of mine have built in the command line without any OOP:</p>

<ul>
<li>Guess the Number Game (the computer generates a number and tells the user if they are too high or too low)</li>
<li>Fortune Teller Games (using arrays and randomization)</li>
<li>Personality Quiz</li>
<li>Hangman Game</li>
<li>Random Name Generator</li>
<li>Text Based Adventure</li>
<li>Reverse Guess the Number Game (The user picks a number and the computer has to guess. This is a great jumping off point for first introducing the concept of an algorithm, since the program needs to make "smart" decisions.)</li>
<li>Minesweeper, battleship, connect four, etc. are great for 2D arrays/lists when you get there</li>
<li>Flash Card Application (students can even actually use this to study for tests for other classes!)</li>
<li>Calculator (if that's too easy, have it do harder math. Can your students build a calculator that solves algebraic equations? Can they make it take derivatives? Solve trig problems? You can apply it to whatever math they likely are learning at the time)</li>
<li>To do list manager</li>
<li>An application that manages a student roster or waitlist for a class</li>
</ul>

<p>I hope these ideas help!</p>

CC BY-SA 4.0
2019-01-12T01:29:44.420Z
These are great ideas for text-based games; that's what I was going to suggest but your list is more complete than mine would have been.  Welcome to the site; hope you stick around!  :)
Wildcard
CC BY-SA 4.0
2019-01-12T17:49:40.693Z
I disagree that debugging skills should be considered as independent learning. They should be covered by the course itself.
Bergi
CC BY-SA 4.0
2019-01-12T22:16:12.227Z
Ah, I may have not been clear. I think that students should be explicitly taught the core skills that enable them to work independently, and I included debugging in that list. I certainly don't think that students should have to learn debugging on their own. Rather, that learning it enables them to be more independent.
Green Griffin
CC BY-SA 4.0
2019-01-11T22:23:37.103Z
2019-01-13T18:40:08.283Z
2019-01-13T18:40:08.283Z
Green Griffin
<p>There is a good class on Coursera for interactive game programming in Python by some professors from Rice University, which I used when I started learning Python. It's really good at introducing the ideas very gradually, but eventually creates a pretty sophisticated game.</p>

<p>There might be some ideas you can get from the course, or maybe you could do an inverted classroom?
<a href="https://www.coursera.org/learn/interactive-python-1" rel="nofollow noreferrer">https://www.coursera.org/learn/interactive-python-1</a></p>

CC BY-SA 4.0
2019-01-12T04:43:21.413Z
2019-01-12T04:43:21.413Z
Allen Wang
<p>What about a circuit python project to finish off the semester? There's no GUI as such, but you can show them a cool demo, then have them learn codes that builds towards some kind of cool interactive project. Doesn't have to be big or expensive, but lets them truly make something tangible out of their code. An Arduino was really the first thing that got me motivated to stick with programming.</p>

CC BY-SA 4.0
2019-01-12T20:36:52.510Z
Please say more about "circuit python". An example would be good. What is  a "cool" demo or a "cool interactive project"?
Buffy
CC BY-SA 4.0
2019-01-13T15:43:58.730Z
Depends on the scope of the class, so I'd say it's up to the OP. My point really is that building something practical, and hands on, can help ground programming. Turning LEDs different colors at the touch of a button, or having them activate based on a particular level of sound or light, can help turn more abstract concepts into something tangible.
Britton
CC BY-SA 4.0
2019-01-12T04:10:48.173Z
2019-01-12T04:10:48.173Z
Britton
<p>I've tried running some demos before starting class and collecting preferences of different children. The list of demo programs is here <a href="https://gist.github.com/danbst/ae4fd7cbb1ea97d5efbc80bd06b50075" rel="nofollow noreferrer">https://gist.github.com/danbst/ae4fd7cbb1ea97d5efbc80bd06b50075</a>, all of which can run out-of-box on any python installation (with tkinter).</p>
<p>Of those the most complicated is Minesweeper using TKinter <a href="https://bit.ly/2ViDFAP" rel="nofollow noreferrer">https://bit.ly/2ViDFAP</a>.</p>
<p>But, most interestingly, children often like terminal programs, not just GUI. Here's my collection of various preferences:</p>
<ul>
<li>labyrinth (terminal)</li>
<li>ascii cats animation, cowboy (terminal game), minesweeper (Tk), nonuniform fractal trees (turtle)</li>
<li>labyrinth, fractal trees</li>
<li>diagonal maze (terminal), DNA animation (terminal), Hilbert curve (turtle), ascii-art digital clock (terminal), Matrix-like animation (terminal)</li>
<li>minesweeper, cowboy</li>
<li>Koch snowflake (turtle), minesweeper</li>
<li>Mona Lisa (turtle drawing image), Koch snowflake, DNA animation, World map (terminal)</li>
</ul>
<p>As you see, even though there were GUI and graphical programs, many children still liked terminal-only demos, or interactive. The &quot;cowboy&quot; program (<a href="https://bit.ly/37pNqmk" rel="nofollow noreferrer">https://bit.ly/37pNqmk</a>) is ridiculously simple, but still generates &quot;fun&quot;.</p>

CC BY-SA 4.0
2020-12-04T16:45:57.173Z
2020-12-04T16:45:57.173Z
danbst
<p><a href="https://www.PySimpleGUI.org" rel="nofollow noreferrer">PySimpleGUI</a> will do what you're after, starting right from the start of teaching Python.  The <a href="https://eCookbook.PySimpleGUI.org" rel="nofollow noreferrer">eCookbook</a> will enable you to see how the architecture looks/works without installing anyone on your computer.  If you like it, you can pip install PySimpleGUI and start coding desktop GUI applications.  Most courses wait until object-oriented programming is taught, which means at the end of the course, if at all.</p>
<p>PySimpleGUI was designed to get around this problem, enabling beginners to make GUI applications without limiting the problem set to only simple applications.  The &quot;Simple&quot; is a description of the ease of programming GUIs, <strong>not</strong> the simplicity/complexity of the GUI and the problems it can solve.</p>
<p>(Full disclosure, PSG is a project that I created, maintain, and extend.  However, I'm not here trying to promoting myself (I dislike fame), but instead trying to be helpful.)</p>

CC BY-SA 4.0
2023-10-11T14:14:52.067Z
Thank you for following the [self-promotion rules](https://cseducators.stackexchange.com/help/promotion). We appreciate genuinely helpful answers that also disclose people's associations. (It might be a good idea to place that disclosure in the answer itself, though it's certainly clear in your username.)
Ben I.
CC BY-SA 4.0
2023-10-12T13:21:28.677Z
It didn't break any rules - that's even why I commented with a thank you.  The post is both helpful and well received by the community, and you're good!  I am modifying the edit, because it's commentary and not truly part of an answer.  We are a small community, and I hope we see more of you.
Ben I.
CC BY-SA 4.0
2023-10-12T13:26:15.533Z
Are you okay with that edit?
Ben I.
CC BY-SA 4.0
2023-10-12T13:58:55.163Z
Of course!  Thank you so much for the kindness and help.
Mike from PSG
CC BY-SA 4.0
2023-10-11T13:06:20.170Z
2023-10-12T13:26:01.763Z
2023-10-12T13:26:01.763Z
Mike from PSG
<p>I teach programming at a university, at 2 freshmen courses. My students are being introduced to programming for the first time, so we have to teach them about algorithms, variables, control flow, functions, arrays (lists), etc. So this course covers the very basics. And every single year I see the same outcome: they get confused, frustrated, and the common question of "what are these exercises for" always arises. We don't even cover OOP and don't teach anything GUI (only CLI programs, just for them to grasp problem solving and creating algorithms).</p>

<p>So this year I'm trying to take a different approach: I'd like to start my course by showing them how to build a GUI program, at first by just asking them to copy and paste, until they have a working program by the end of the first class. Of course they won't understand a thing at first. But if I show them all the topics "in action" then I can introduce them to the students during the course and review the project we made on our first class.</p>

<p>The thing is, I'm not exactly sure what to show them. I think something like a calculator would be far too simple and might not be too attractive to young, 18-year old students that own mobile devices and see all kinds of cool applications every day. But something like a minesweeper game might be just too big a project for me to show as an example on the first class, considering they will be watching me build a program and trying to mimic what I do without understanding yet, so if this part of my class lasts for too long it might bore them to death :P</p>

<p>I know my course doesn't cover GUI, but I've noticed young students are not familiar at all with command-line, so maybe I can just tell them there are things on the program I'm showcasing that they will learn in future courses. As long as they get to see examples of the more basic stuff.</p>

<p>So, any good suggestions?</p>

CC BY-SA 4.0
2019-01-12T14:06:57.193Z
Something short to keep in mind: not every GUI platform for Python works well together with proper scoping (there are famous libraries where the mainscreen is in the global scope and can't be encapsulated, go figure). Keep in mind to check for such things if you want to teach your students to do it the "right" way, since it appears that's important to you.
Mast
CC BY-SA 4.0
2023-10-12T05:30:08.240Z
Maybe a to do list?  As [TodoMVC](https://todomvc.com/) as famour for anyone who wants to do webapp.
Qiulang 邱朗
<project><python>
Any simple Python GUI projects for beginner/novice programming students?
# Any simple Python GUI projects for beginner/novice programming students?

(Asked by: username_0 on 2019-01-11)

I teach programming at a university, at 2 freshmen courses. My students are being introduced to programming for the first time, so we have to teach them about algorithms, variables, control flow, functions, arrays (lists), etc. So this course covers the very basics. And every single year I see the same outcome: they get confused, frustrated, and the common question of "what are these exercises for" always arises. We don't even cover OOP and don't teach anything GUI (only CLI programs, just for them to grasp problem solving and creating algorithms).

So this year I'm trying to take a different approach: I'd like to start my course by showing them how to build a GUI program, at first by just asking them to copy and paste, until they have a working program by the end of the first class. Of course they won't understand a thing at first. But if I show them all the topics "in action" then I can introduce them to the students during the course and review the project we made on our first class.

The thing is, I'm not exactly sure what to show them. I think something like a calculator would be far too simple and might not be too attractive to young, 18-year old students that own mobile devices and see all kinds of cool applications every day. But something like a minesweeper game might be just too big a project for me to show as an example on the first class, considering they will be watching me build a program and trying to mimic what I do without understanding yet, so if this part of my class lasts for too long it might bore them to death :P

I know my course doesn't cover GUI, but I've noticed young students are not familiar at all with command-line, so maybe I can just tell them there are things on the program I'm showcasing that they will learn in future courses. As long as they get to see examples of the more basic stuff.

So, any good suggestions?

**Tags:** project, python

> **Comments:**
> **username_1**: Something short to keep in mind: not every GUI platform for Python works well together with proper scoping (there are famous libraries where the mainscreen is in the global scope and can't be encapsulated, go figure). Keep in mind to check for such things if you want to teach your students to do it the "right" way, since it appears that's important to you.  
> **username_2**: Maybe a to do list?  As [TodoMVC](https://todomvc.com/) as famour for anyone who wants to do webapp.  

---

## 9 answers

### Answer by username_9 on 2019-01-11. Score: 10 | Accepted answer

Unfortunately, GUI programming is sufficiently different from algorithmic programming that if you start with it students can get the wrong idea about what a program should look like.

For example, when I write an algorithmic program, using good OO techniques, a method of five lines is starting to be too long. The granularity of a good OO program can be very small with the complexity in the interactions between objects rather than in the methods themselves.

But GUI programs typically have long and boring methods that are mostly just messages to library code, rather than being interesting in themselves.

On the other hand, with some preparation, you can/should provide a framework in which the students can work, so that they don't start with an empty page and nothing but language features. You provide a library tailored for their education. Your library can contain the GUI code and they build the algorithms to fit it.

Back in the 1980's the book *Karel the Robot* by Richard Pattis did a similar thing for structured programming in Pascal. He provided a simulator along with the GUI code. Students wrote programs to make a robot do interesting things. By "interesting", I mean that the system was Turing Complete, so that, in theory, any program could be written within the framework. It actually used a very small, Pascal-like, language with only a few primitives. Students didn't actually program with integers and strings, but with the primitive elements of the simulation. But, Turing Complete.

Karel the Robot has been updated to modern OO standards and versions exist for Java, Python, and Ruby. The Java version has been used for APCS courses and in college level courses as well.

For Java, there is a special resource called the [Greenroom](https://greenroom.greenfoot.org) that provides many other teacher-written simulation frameworks in which the students program. I don't know of a similar resource for Python, but you could, perhaps tailor some of the ideas there to Python.

> **Comments:**
> **username_6**: I've used [hour of code](https://hourofcode.com/ca/learn) for tools similar to the Greenroom (there are some college level materials and some of the games are great practice sessions for college students, think 15-20 min instead of 4x45 minute lessons) - I've specifically used [these games](https://codecombat.com/teachers/hour-of-code) to teach event-driven programming for a web/phone based course I helped with  

---

### Answer by username_10 on 2019-01-11. Score: 11

In my experience, good introductory programming courses meet three overarching goals:

1. **Empower** students to create simple programs outside of the scope of the class by giving them the technical skills and the practice to begin being independent. This includes teaching the basics of one usable language.
2. **Inspire** students to continue learning and using their skills once the class ends (independently and/or by signing up for the next class in the sequence).
3. **Prepare** students for the next step in their learning. In many cases, this means that certain topics and concepts must be covered so that students can enter the next class at the correct level. It should also include giving students practice with the skills needed for basic independent learning including debugging, googling to find solutions to problems, and initial exposure to reading and utilizing documentation.

It sounds like you have seen issues with goal number two, where your students do not feel inspired. However, I am concerned that introducing your introductory students to GUI building right off the bat will jeopardize goal number one. GUI has a lot of overhead, and as you said, your students will not understand what they are doing and will be frustrated by their inability to build anything without heavy guidance/pre-built pieces.

My suggestion is to strike a middle balance. Have them build command line applications that they fully understand, but that are interesting or useful in some way. Better yet, give them some choice in which projects to tackle so that they are more invested.

Here are some neat things that students of mine have built in the command line without any OOP:

* Guess the Number Game (the computer generates a number and tells the user if they are too high or too low)
* Fortune Teller Games (using arrays and randomization)
* Personality Quiz
* Hangman Game
* Random Name Generator
* Text Based Adventure
* Reverse Guess the Number Game (The user picks a number and the computer has to guess. This is a great jumping off point for first introducing the concept of an algorithm, since the program needs to make "smart" decisions.)
* Minesweeper, battleship, connect four, etc. are great for 2D arrays/lists when you get there
* Flash Card Application (students can even actually use this to study for tests for other classes!)
* Calculator (if that's too easy, have it do harder math. Can your students build a calculator that solves algebraic equations? Can they make it take derivatives? Solve trig problems? You can apply it to whatever math they likely are learning at the time)
* To do list manager
* An application that manages a student roster or waitlist for a class

I hope these ideas help!

> **Comments:**
> **username_11**: These are great ideas for text-based games; that's what I was going to suggest but your list is more complete than mine would have been.  Welcome to the site; hope you stick around!  :)  
> **username_5**: I disagree that debugging skills should be considered as independent learning. They should be covered by the course itself.  
> **username_10**: Ah, I may have not been clear. I think that students should be explicitly taught the core skills that enable them to work independently, and I included debugging in that list. I certainly don't think that students should have to learn debugging on their own. Rather, that learning it enables them to be more independent.  

---

### Answer by username_12 on 2019-01-12. Score: 3

There is a good class on Coursera for interactive game programming in Python by some professors from Rice University, which I used when I started learning Python. It's really good at introducing the ideas very gradually, but eventually creates a pretty sophisticated game.

There might be some ideas you can get from the course, or maybe you could do an inverted classroom?
<https://www.coursera.org/learn/interactive-python-1>


---

### Answer by username_13 on 2019-01-12. Score: 2

What about a circuit python project to finish off the semester? There's no GUI as such, but you can show them a cool demo, then have them learn codes that builds towards some kind of cool interactive project. Doesn't have to be big or expensive, but lets them truly make something tangible out of their code. An Arduino was really the first thing that got me motivated to stick with programming.

> **Comments:**
> **username_9**: Please say more about "circuit python". An example would be good. What is  a "cool" demo or a "cool interactive project"?  
> **username_13**: Depends on the scope of the class, so I'd say it's up to the OP. My point really is that building something practical, and hands on, can help ground programming. Turning LEDs different colors at the touch of a button, or having them activate based on a particular level of sound or light, can help turn more abstract concepts into something tangible.  

---

### Answer by username_14 on 2020-12-04. Score: 2

I've tried running some demos before starting class and collecting preferences of different children. The list of demo programs is here <https://gist.github.com/username_14/ae4fd7cbb1ea97d5efbc80bd06b50075>, all of which can run out-of-box on any python installation (with tkinter).

Of those the most complicated is Minesweeper using TKinter <https://bit.ly/2ViDFAP>.

But, most interestingly, children often like terminal programs, not just GUI. Here's my collection of various preferences:

* labyrinth (terminal)
* ascii cats animation, cowboy (terminal game), minesweeper (Tk), nonuniform fractal trees (turtle)
* labyrinth, fractal trees
* diagonal maze (terminal), DNA animation (terminal), Hilbert curve (turtle), ascii-art digital clock (terminal), Matrix-like animation (terminal)
* minesweeper, cowboy
* Koch snowflake (turtle), minesweeper
* Mona Lisa (turtle drawing image), Koch snowflake, DNA animation, World map (terminal)

As you see, even though there were GUI and graphical programs, many children still liked terminal-only demos, or interactive. The "cowboy" program (<https://bit.ly/37pNqmk>) is ridiculously simple, but still generates "fun".


---

### Answer by username_15 on 2023-10-11. Score: 2

[PySimpleGUI](https://www.PySimpleGUI.org) will do what you're after, starting right from the start of teaching Python. The [eCookbook](https://eCookbook.PySimpleGUI.org) will enable you to see how the architecture looks/works without installing anyone on your computer. If you like it, you can pip install PySimpleGUI and start coding desktop GUI applications. Most courses wait until object-oriented programming is taught, which means at the end of the course, if at all.

PySimpleGUI was designed to get around this problem, enabling beginners to make GUI applications without limiting the problem set to only simple applications. The "Simple" is a description of the ease of programming GUIs, **not** the simplicity/complexity of the GUI and the problems it can solve.

(Full disclosure, PSG is a project that I created, maintain, and extend. However, I'm not here trying to promoting myself (I dislike fame), but instead trying to be helpful.)

> **Comments:**
> **username_16**: Thank you for following the [self-promotion rules](https://cseducators.stackexchange.com/help/promotion). We appreciate genuinely helpful answers that also disclose people's associations. (It might be a good idea to place that disclosure in the answer itself, though it's certainly clear in your username.)  
> **username_16**: It didn't break any rules - that's even why I commented with a thank you.  The post is both helpful and well received by the community, and you're good!  I am modifying the edit, because it's commentary and not truly part of an answer.  We are a small community, and I hope we see more of you.  
> **username_16**: Are you okay with that edit?  
> **username_15**: Of course!  Thank you so much for the kindness and help.  

---

### Answer by username_3 on 2019-01-13. Score: 1

# On command line

To make command line programs make sense, you need to first teach Unix (Or another OS with a workable command line: VMS, Amiga-dos, sorry I can't think of any others that are still relevant).

When one can see the value in a powerful command line, where one can complete tasks much more quickly and with less pain, then it becomes obvious why one would write ones own command line programs.

# On GUI

Yes for graphical programming, but this is not GUI programming.

I have used python turtle, it aids learning because it gives immediate feedback. I have used it to teach the basics, in schools. It could also be used to teach algorithms: First teach basics, then add drawing of data sets, then …

# UnPlugged

Also consider teaching some of it unplugged. You can teach algorithms, by having the students be the data, by having a student direct, by having a student explain, by using props e.g. backs of cards, white boards, paper, mini-whiteboards, …

See <https://csunplugged.org/en/> for some ideas. This site is aimed at primary school teachers, but most of it can be adapted.


---

### Answer by username_4 on 2019-01-12. Score: 1

There is little point these days in making a GUI program, except in the most rare cases, especially with Python. In the age of the internet, most programs are best served as web apps. I expect this will be most relevant to your students' interests as well. For Python I would suggest starting with Flask or Django. There are good Django tutorials here:

* <https://docs.djangoproject.com/en/2.1/intro/tutorial01/>
* <https://tutorial.djangogirls.org/en/>

And I like this Flask one:

* <https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world>

All of these should show you how to make a basic app, which has a GUI in the form of a web interface.

You might also consider something more visual in the form of basic data analysis and plotting with Jupyter notebooks.

> **Comments:**
> **username_5**: This requires the students to understand all kinds of web techniques, most notably HTTP and HTML, which might be too advanced for freshmen students (without being the actual subject of the course). It makes more sense at a later stage of the curriculum when they already learned about network stuff.  
> **username_1**: How is a web app not a GUI? The client is quite graphic usually.  
> **username_6**: @mast with Python? the web app would be a GUI app (if its actually an app not an interface) but its not event driven like a standalone GUI app would be (or rather to make it event driven you would have to switch to Javascript) - so it would end up not teaching the students the same lessons (or language). I wouldn't say standalone GUIs are rare - remember cell phone games and tools as well as office applications are still typically stand-alones. Just depends on the field (like I will probably never write another serious webapp but GUIs? yeah, all the time in C# with python backend)  
> **username_4**: @JGreenwell thats what I was getting at. Creating the actual GUI for those apps is often not done with Python. The skills to build a web app may be outside the scope of a freshman curriculum, but you should not forget that this is probably why those students signed up for Computer Science in the first place; to learn mainstream app building techniques. I doubt they signed up because they wanted to learn algorithms. And both Flask and Django are easy enough to learn from the tutorials I posted, I taught myself both using these.  
> **username_7**: Back-end web gives a pretty poor coolness-to-difficulty ratio needed to keep new learners engaged. Data persistence isn't interesting until one has already created a front-end game or todo list and wants to keep a high score table (and localStorage isn't exciting any more) or add multiplayer features. This lack of visual options (aside from turtle) is part of why I find Python to be a less engaging language for new students than JS/HTML5.  

---

### Answer by username_8 on 2019-01-16. Score: 1

I teach event-driven GUI programming in Java. This requires machinery. First of all, students need to be good at writing functions and procedural programs. Secondly, they need to understand polymorphism and inheritance, as these are vital tools. So, we are beyond the range of beginners here.

However, if you teaching Java, GUIs are a compelling use case for the whole inheritance mechanism. Java8 lambdas make the writing of callbacks simpler and more fun. I use the JavaFX framework for this purpose. If you are doing this in java11, it is tricky to get set up and configured.

I don't see this as a game for novices.


---

