Forums Register Login

Head First 2nd edition Code Magnets

+Pie Number of slices to send: Send
Before I give away the ranch with a dash of code. Is it possible that the Code Magnets scramble on page 20 have a certain line of code that needs to be duplicated to get the proper output?
+Pie Number of slices to send: Send
You are correct. One of the magnets needs to be used twice in order to produce the correct results. This is not reflected in the solution shown on page 25. (Entering the code on pg 20 does result in incorrewct ouput). The "problem" then becomes by reusing that one magnet, the while loop beomces unneccessary since you only "loop" through it one time.
+Pie Number of slices to send: Send
You have no idea how good that makes me feel :-)
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 697 times.
Similar Threads
TestThreads Code Magnets exercise Head First Java
Spam?
SCWCD Study Companion - Practical vs. Knowledge
HFSJ page 380
HF and the magnets
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:07:49.