I am trying to do the problem 26.1.1 in the book HTDP and I just feel like the
more I think about it, the more confused I get. I found a post from 2007 with
some tips from Jens Axel Søgaard, the link is
http://objectmix.com/scheme/186349-htdp-generative-recursion.html.
I understand whats to be
I had made a previous post on this subject and have spent a few days trying to
work out this problem but I feel like I have hit a dead end, and I am hoping I
can get some advice from a few people with more experience than I.
The code I have managed to create so far is:
(define(find-div n i)
(c
I have been trying to take a break for the weekend and I am going to try to go
back at it with a fresh perspective Monday.
One
thought I did have though, you said tabulate-div means we want all the
divisors of 20, so the next step would be tab-div(sub1 n), or 19, Im
thinking that would mean a
Something that looks like this:
(define(tabulate1 n i)
(cond
[(> i n)empty]
[(=(remainder n i)0)(cons i(tabulate1 n(add1 i)))]
[else(tabulat1 n(add1 i))]))
(define(tabulate n)
(tabulate1 n 1))
I
feel like I understand how it works recursively, just the generative
recursion method makes me stru
Yes, I have completed all the previous challenges, I have completed most 3
times, and some 2 times. For the most part with all the previous challenges I
never had too much trouble. The only other problems that gave me a decent
amount of trouble were the permutation function, and computing natura
I am able to define a generative function for tabulate the divisors of 20, so
hopefully tomorrow I can figure out how to abstract it, Im sure I might have a
bit more trouble with the final step I need to figure out for abstraction. I
just wanted to say thanks to wooks and anyone else, I felt ver
I am having trouble changing the Sierpinski function to consume structures,
instead of coordinates. I used the same function design for too-small as in
27.1.1, I edited each sub function used to consume triangles as well. When
testing the new function with a triangle, and comparing it to previou
I have a nearly working code, it draws the tree, but it is slightly off. I
realize what is wrong that is causing the problem, for each recursive call I
used a set angle. The tree draws all the left branches at the same angle and
all right branches at the same angle. I end up with a picture of a
I suppose I should have clarified that, yes, its from the book, section 27.1.4.
--- On Sat, 11/13/10, Noel Welsh wrote:
From: Noel Welsh
Subject: Re: [racket] Svannah fractals.
To: "Ken Hegeland"
Cc: us...@lists.racket-lang.org
Date: Saturday, November 13, 2010, 7:35 AM
I this in
Hi, Im sorry if I appear to be coming here a lot, just having trouble with the
algorithm section more than any others.
http://www.htdp.org/2001-01-18/Book/node145.htm
I believe I completed find-root-linear, which to me seems like just testing if
a number in the table is a root of some function,
The problem is 27.5.4 can be found at
http://htdp.org/2003-09-26/Book/curriculum-Z-H-34.html#node_sec_27.5
I am still on the beginning of this extended exercise and I am entirely lost. I
know how it works but can't get anything even remotely close. I was able to
create subtract from 27.5.2, but
The exercise can be found
at:http://htdp.org/2003-09-26/Book/curriculum-Z-H-40.html#node_sec_32.2
I am stuck at 32.2.6-.7
I originally had some information incorrect and was able to get mc-solution
working correctly, except it didn't need someone to remain on the boat at all
times. So it just
on.
--- On Tue, 11/30/10, Matthias Felleisen wrote:
From: Matthias Felleisen
Subject: Re: [racket] Missionaries and cannibals
To: "Ken Hegeland"
Cc: us...@lists.racket-lang.org
Date: Tuesday, November 30, 2010, 3:19 AM
1. Your sketch sounds about right. The problem is probably sticking to
gal also return false if input matches some item in history. This
would allow me to filter out all illegal moves and previously seen moves.
--- On Tue, 11/30/10, Matthias Felleisen wrote:
From: Matthias Felleisen
Subject: Re: [racket] Missionaries and cannibals
To: "Ken Hegelan
figure out a way to produce false.
--- On Tue, 11/30/10, Matthias Felleisen wrote:
From: Matthias Felleisen
Subject: Re: [racket] Missionaries and cannibals
To: "Ken Hegeland"
Cc: us...@lists.racket-lang.org
Date: Tuesday, November 30, 2010, 2:08 PM
Ken, you have not absorbed t
Figured it out, thanks for all the help Matthias.
--- On Tue, 11/30/10, Matthias Felleisen wrote:
From: Matthias Felleisen
Subject: Re: [racket] Missionaries and cannibals
To: "Ken Hegeland"
Cc: us...@lists.racket-lang.org
Date: Tuesday, November 30, 2010, 11:12 PM
On Nov 30, 201
I am working on 39.1.8 of HTDP
http://htdp.org/2003-09-26/Book/curriculum-Z-H-49.html#node_sec_39.1
I have the gui all set up. The examples in the book use:
(define friends
(make-address-book "friends"))
and then applies friends to the argument, 'add, or 'search.
My thought was a basic list proce
I wasn't quite sure what to name this, it is a two part question.
I am nearly done with HTDP, and I am starting a small project of my own to make
a simple turn based rpg. Its mostly structure mutation. My goal is to use draw
mazes on the canvas and then have a character item(most likely a solid
While you got it working, you are over complicating the process.
First you defined that variables, that's fine
(define tax-rate .15)
(define pay-rate 12)
The function net-pay only needs one input, the amount of hours you are working.
With the defined pay-rate and tax-rate, how would you determi
I am just about done with the book, only a few more exercises.
The method I went at for this problem was to just set the initial position to
false and then recur on the interval.
My thinking is, to make all the spots the queen threatens on a horizontal, you
would leave the y and adjust the x.
The idea of embedding a program inside another is learned later in the book,
check on local to see how it works, or don't worry about embedding until later
on.
Simply define the function for now to just produce the amount of tax, 0, .15,
or
.28.
So the program should work like this
(equal? (t
Also, Evaluate
(check-color 'red 'red 'green 'red)
find out what you expect the answer and then step through it and see what
happens.
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
I apologize, meant to say check:
(check-color 'red 'red 'red 'green)
_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
Does (check-color 'red 'red 'red 'green) seem like a perfect match?
Now check
(check-color 'green 'red 'red 'red)
it's a very minor coding error I wanted to point out to sayth
________
From: Stephen Chang
To: Ken Hegela
24 matches
Mail list logo