Questions tagged [exercises]

Questions related to programming exercises that are meant to increase students' skills. Use this tag to ask questions about exercises related to a specific skill or skill-set.

Filter by
Sorted by
Tagged with
10 votes
8 answers
6k views

Why do we practice printing patterns while coding?

Why do we practice printing patterns while coding? Patterns like: 1 1 2 1 2 3 1 2 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15, etc. Are these kinds of pattern questions ...
4 votes
3 answers
377 views

What sort of programming assignments do you give in an FP course?

I teach programming to a science/engineering students. Here is a typical sequence of assignments for a beginning programming class: Arithmetic and conditionals: does ...
2 votes
1 answer
91 views

What are some good conditional branching excercise scenarios?

I want to get my students to exercise the conditional-branching mind-muscle. [edit: and I need it to be fun/playful] I will ask them to read pseudo-code, then represent as a branching sketch[^1]. And ...
  • 123
4 votes
6 answers
389 views

Reference request for resource with difficult programming exercises

I am asking this question on behalf of my brother. He is taking his first programming class. So far he has just learned the basics (if-then statements, for loops, while loops, etc.) The class is using ...
  • 143
3 votes
1 answer
58 views

How to use CSS diner to teach beginners in CSS

CSS diner is a game for learning CSS selectors. But it goes "into the woods" relatively quickly, focusing more on breath of selectors than on mastery of fundamentals Can it be productively ...
  • 331
5 votes
1 answer
156 views

games for teaching html

I have had good results, and happy students, using CSS diner to teach CSS selectors (I will share more in another question). And one of my students asked me if there is a similar game for html. Is ...
  • 331
4 votes
1 answer
112 views

Looking for good Master Theorem examples

I'm teaching an Algorithms class (junior/senior level), and we've just proved the validity of the Master Theorem. I'd like some good questions on it, both for homeworks and for exam questions. Problem ...
1 vote
1 answer
129 views

Which are common misconceptions about code execution? How to efficiently debug my student?

I may tutor a student who just started learning "school C", by which I mean that strange kind of C seen only on school books (and that in my opinion "cripples the mind", so to say, but I digress). I ...
  • 384
1 vote
1 answer
47 views

How can I teach the students a package/module in a computer lab?

I will be teaching a course to college students in their 3rd year in college study. So far, they have taken only one programming course in MATLAB. We have a package, i.e., is a set of functions, ...
  • 11
3 votes
1 answer
159 views

Is it worth to learn to make a MD5-hash cracker?

I found a puzzling site where one puzzle was to find a string whose MD5-hash is given. Is such a puzzles good for learning? I mean, I believe that hash might be cracked by using enough computing ...
  • 33
0 votes
0 answers
52 views

Spring core exercices

I'm actually studying (free studying using online books) to pass the Pivotal Spring core certification and i need some exercices (online or pdf) to practice in order to master the framework as well, ...
  • 111
0 votes
1 answer
69 views

What makes a good explanation? [closed]

I'm thinking of studying, "What makes a good explanation?" in the context of introductory computer science problems. I'm wondering if there's any pre-existing dataset containing introductory ...
  • 101
9 votes
8 answers
363 views

Exercise or example to reinforce idea of functions?

I have a group of students with a very shaky understanding of functions and their purpose (encapsulation, reuse, modularization). The assignments I give them require them to write simple functions ...
  • 296
5 votes
0 answers
129 views

Small to medium scale exercises about Haskell's higher abstractions

Short version: Where can I find highly varying, small or medium-sized exercises and examples on the use, identification and instance declaration of Haskell's abstractions such as applicatives, monads, ...
  • 171
6 votes
6 answers
290 views

Should I Provide Answers To Exercises?

I'm preparing some exercises to introduce software developers who have no experience with Scheme to the language. Part of the exercises are simple things like: ...
5 votes
5 answers
267 views

A meaningful exercise that requires using a destructor

I am teaching destructors in C++ and would like to give the students an interesting homework exercise that requires them to build a class with destructor. In previous years, the homework were ...
6 votes
3 answers
167 views

Using questions from a code-competition website in homework and exams

There are various websites like codewars that present programming challenges in various languages and difficulty levels. I looked at some of their challenges and they seem to be more creative than me ...
6 votes
1 answer
375 views

What are good class exercises on design patterns?

When I teach a programming course, I like to spend 10-20 minutes in each lesson on some programming exercises that the students do in class. This lets me see whether the students understand the ...
4 votes
2 answers
203 views

Best Practices for introductory teaching

Literature states that there are particularly difficult issues with introducing programming, and that many of the issues are still not well understood. But some results indicate that these are some ...
's user avatar
4 votes
4 answers
1k views

Lambda expressions exercises and practice

While lambda expressions in java 8 are really cool in action, the school curriculum offers no exercises in this. So essentially, students never actually learn how to use lambda expressions and the ...
  • 6,227
3 votes
2 answers
141 views

Genetic Algorithm enrichment lesson

As a special lesson, I would like to show students the very basic idea of genetic\evolutionary algorithms. I let them play a bit in a genetic algorithm online game, to get the idea. Then I teach them ...
  • 6,227
4 votes
4 answers
3k views

Basic OOP practice exercises for inheritance and polymorphism

After teaching inheritance and implementation (implements vs extends in Java) and overriding methods and basic OOP (classes and ...
  • 6,227
5 votes
2 answers
515 views

Excel macro recorder exercises

On advanced Excel courses I teach attendees how to use the macro recorder. I also start VBA beginner trainings with the recorder and analysing the recorded code. I find the macro recorder a good entry ...
  • 1,388