Teach Programming
- Intro CS: Python, Java, C, Lisp, or Haskell?
How does your school/university teach it? What have been the pros and cons of that choice? Obviously, teaching students logical and foundational concepts is the most important part, but a student's first programming language does color their internalization of the concepts and how they approach solving different problems. For example, OOP is really hard to grasp coming from a functional background. Learning how to manage memory efficiently and use appropriate data types is really hard coming from an interpreted language like Python or Javascript. What have you and your peers decided works best for you and your students?
- Project Ideas For Selection Statements
Hey all, I want to revamp some of my assignments this coming semester. One of the first projects I always start with is something to get some hands-on experience with conditional logic. However, these projects are getting pretty stale at this point. So, I'm turning to this community for some fresh ideas.
Keep in mind, these assignments are for brand-new programmers within the first 2-4 weeks of the course. At this point, they won't have really been taught loops, functions, collections, etc., beyond that they exist. They really just know basic syntax, variable types, and terminal input and output. This is where they will practice working with boolean expressions and selection statements like if-else, if-else if-else, and switch.
Here's what I've been doing for some reference:
-
Write a program to turn an integer grade into a letter grade.
- 50 -> F
- 81 -> B-
- 99 -> A+
-
Write a program to convert a number from 1 to 7 into the corresponding day of the week.
- 1 -> Monday
- 7 -> Sunday
-
Write a program that determines the time necessary for sound to travel a given distance in a given medium.
- 500ft, water -> 0.1s
- 1500ft, air -> 1.3s
-
Write a program that determines the total price of a bulk order of widgets, with discounts for orders over a certain amount according to some table.
- 30 -> $30
- 500 -> $300
-
Write a program that determines the quadrant of a given point.
- 15, 7 -> Quadrant I
- 6, -4 -> Quadrant IV
-
- Humor: student answers
Share some the answers you got from those special students. I'll begin: ****
- Do you think I'll pass the subject? (Student with an average of 9.5 over 10)
*****
-
Do you think with this project I'll pass the subject? (Project fully copy&pasted from ChatGPT, including sentences like "I'm just an AI...") ******
-
Well, it keeps saying I need one more parenthesis here.
-
Well, try adding one?
-
It works! Wow, you're the best!
-
...
- Please read: community rules
This community is a hub where programming teachers can discuss methodologies, ways to improve teaching skills, classroom engagement, best practices...
It can also be a place to comments and discuss problems with students (but keeping anonymity always in mind) and make some humor about the hardships of our profession. If you are not yet a teacher, but want to become one, you're also welcome.
We won't do your assignments. Go to Learn_programming for that! (not really).
- Which are the most neccessary skills to effectively teach programming?
To me it's empathy. And memory, being able to remember how it was not understanding something that now seems simple.