Confused on excerise on htdp

What does the exercise want you to do?

What is boolean? what does it expect as input, what is its output?
What are functions ending with a question mark ? called?
Here is where functions are first introduced: Prologue: How to Program


In general it seems you have skipped parts of the book and it is difficult to help you, because I don't know which parts you may have skipped. And me giving you the solution wouldn't help you in learning.

To make it easier to help us, help you, you should follow the design-recipe:
I Fixed-Size Data: 3.1 Designing Functions

This way it is easier for other people reading your code to recognize what parts you already understand and which parts you need guidance with.

Following the design recipe is also for yourself, because it structures a task in a way that causes you to get clear about what you are trying to accomplish and it gives you a clear structure to follow,
this allows you to reach the goal incrementally, avoiding confusion.

In general I advise you to go back to the beginning and see what parts you need to re-read, because there are definitely parts you have skipped, those skipped parts now cause your confusion.


Too be a bit more cheeky :stuck_out_tongue:: if you can't be bothered to follow the design recipe, then I can't be bothered to answer any more questions. (I am a volunteer and a lot of other people here are...)

Why? Because it is not productive if I replicate what How to Design Programs teaches, spread across a lot of different help topics.

If I can see that you can do what the book wants you to do:
follow the design recipe and you still need help, then I am more inclined to spend my free time, volunteering to help someone.

There is a reason why netiquette is a thing, because with it, it is more likely that people want to answer.
Within the context of How to Design Programs you should follow the design recipe.

3 Likes