# The Nature Of Code Chapter 1 Solutions

**URL:** <https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288>\
**Category:** Beginners\
**Created:** [October 15, 2022, 8:44pm UTC](https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288 "2022-10-15T20:44:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![felicia](https://avatars.discourse-cdn.com/v4/letter/f/cdc98d/32.png) [@felicia](https://discourse.processing.org/u/felicia)\
**Post date:** [October 15, 2022, 8:44pm UTC](https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288/1 "2022-10-15T20:44:12Z")

</div>

Hi there,

Does anyone know if the solutions for the examples in the book/site ‘The Nature of Code’ are available somewhere online? It seems like not everything is on Github … ?

[http://natureofcode.com](http://natureofcode.com/)

[https://github.com/shiffman/The-Nature-of-Code-Examples](http://github.com/shiffman/The-Nature-of-Code-Examples.html)

I can’t find the solution for exercise 1.8 and 1.2 of Chapter 1, for example.

Thanks!

---

<div class="post-metadata">

**Author:** ![debxyz](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@debxyz](https://discourse.processing.org/u/debxyz)\
**Post date:** [October 15, 2022, 9:35pm UTC](https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288/2 "2022-10-15T21:35:15Z")

</div>

Hello!  
Have you checked the Dan Shiffman/ Coding Train YouTube channel?  
He has tutorials for each concept and most (I believe) of the chapters. Certainly for the first several.  
🤓

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 15, 2022, 9:49pm UTC](https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288/3 "2022-10-15T21:49:16Z")

</div>

> [@Why Always report errors](https://discourse.processing.org/t/why-always-report-errors/36342):
>
> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147) \</\>Mover[] movers = new Mover[100]; 液体; void setup（）{ size（640，320）; smooth（）; for（int i =0;i\<movers.length;i++）{ movers[i] = new Mover（random（0.1，5），0，0）; } 液体 = 新液体（0，高度，2，高度/2，0.1）; } void draw（）{ background（255）; liquid.display（）; PVector wind=new PVector（0.01，0）; PVector gravity=new PVector（0，0.1）; for（int i =0;i\<movers.length;i++）{ if（movers[i].isInside（liquid））{ movers[i].drag（liquid）; } 浮点数 m =…

---

<div class="post-metadata">

**Author:** ![vkbr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/vkbr/32/16844_2.png) [@vkbr](https://discourse.processing.org/u/vkbr)\
**Post date:** [October 16, 2022, 2:00am UTC](https://discourse.processing.org/t/the-nature-of-code-chapter-1-solutions/39288/4 "2022-10-16T02:00:30Z")

</div>

I think this is it:

> **[GitHub - nature-of-code/noc-examples-processing: Repository for example code...](https://github.com/nature-of-code/noc-examples-processing)**
>
> Repository for example code from The Nature of Code book - GitHub - nature-of-code/noc-examples-processing: Repository for example code from The Nature of Code book

 ![Screen Shot 2022-10-15 at 23.00.14](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/7/a79da9ee74c95cb34c3e8f48ce5aaac39c1d4bd6.png)
