[EIWL] Solving problems in Chapter 7 of EIWL Book by Stephen Wolfram

Hi all.

This thread is for getting help with any and all problems in Chapter 7, using functions from previous chapters only. It is for people who are learning Mathematica and working their way through the book.

I am stuck on question 7.7 Make a list of colors obtained by blending yellow with hues from 0 to 1 in steps of 0.05..
Blend[{Yellow, Hue[{0, 1, 0.05}]}] doesn’t work, and I am pretty sure I need to wrap it all in Table, this didn’t work either:

Table[Blend[{Yellow, Hue[{0, 1, 0.05}]}], 20] . 

20 was arbitrary, and is wrong - the list should automatically fill up to a natural limit, without needing the limit to be hard coded.

Thanks in advance for any help. :slight_smile:

(Generates table of hues from 0 to 1 in steps of 1/20)
Table[
Hue, {x, 0, 1, 1/20}]
(Blends yellow with each hue in table)
Table[
Blend[{Yellow, Hue}], {x, 0, 1, 1/20}]
(Example code from blend documentation)
Graphics[
Table[{Blend[{Red, Blue}, x], Disk[{8 x, 0}]}, {x, 0, 1, 1/8}]]
(Putting it all together)
Graphics[
Table[{Blend[{Yellow, Hue}], Disk[{8 x, 0}]}, {x, 0, 1, 1/20}]]

V Z, thanks for your reply.

This is the solution(from your reply):

Table[ Blend[{Yellow, Hue[x]}], {x, 0, 1, 1/20}]

Now I am stuck on 7.8.

Table[{Range[x], Hue[x]}, {x, 0, 1, 0.1}] gets the right hues, but there are no numbers.
Table[Range[x], {Hue[x], {x, 0, 1, 0.1}}] doesn’t work.
Table[Hue[Range[x]], {x, 0, 1, 0.1}] doesn’t work.

Hey, I just found the complete solutions to all the questions in the book!