A simple Riddle game in Perl
This was part of a project for Teaching Informatics classs in 3rd semester at university. It is simple because it is supposed to be what the students would have made if this was their assignment and what they would have learned from this. Here I have only the code of the assignment.
I believe that telling the students to make a game is a fun activity to learn how to code. This is an example of that. For this game you don't need to be an expert or even intermediate in programming. Specifically these types of riddles have a lot of back and forth and this gives us the oportunity to teach how loops work to students. Also the kind of visualization you get from the game makes it more understandable to some students. It is a simple and fun lesson.