# Help with code project

**URL:** https://discourse.processing.org/t/help-with-code-project/1219
**Category:** Coding Questions
**Tags:** homework
**Created:** [June 24, 2018, 5:18pm UTC](https://discourse.processing.org/t/help-with-code-project/1219 "2018-06-24T17:18:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jewlz0205](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jewlz0205](https://discourse.processing.org/u/Jewlz0205)
#### Post date: [June 24, 2018, 5:18pm UTC](https://discourse.processing.org/t/help-with-code-project/1219/1 "2018-06-24T17:18:49Z")

</div>

Hello! My teacher asked us to do a simple wind chill calculation and have our code run to the display window along with a string of text. I feel like all of my calculations are correct, however, I could really use some tips with my organization of the code. It looks like a mess right now. Any tips or suggestions would be awesome! Also If anyone knows how to set and image as the background() and center the text that would be great. Thanks 🙂

 ![38%20PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/1X/8d01b0246171b683ef86eb10bc21d21a496fada0.jpg)

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [June 24, 2018, 6:54pm UTC](https://discourse.processing.org/t/help-with-code-project/1219/2 "2018-06-24T18:54:32Z")

</div>

> [@Jewlz0205](#):
>
> Also If anyone knows how to set and image as the background()

Simply use `background(img);` and see the documentation :

- [background() / Reference / Processing.org](https://processing.org/reference/background_.html)

If you want to center your text you could say :

```auto
textAlign(CENTER);
text("My text",width/2,height/2);

```

Next time you should provide your full code (not a screenShot) 😉

---

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [June 24, 2018, 9:42pm UTC](https://discourse.processing.org/t/help-with-code-project/1219/3 "2018-06-24T21:42:30Z")

</div>

You place your `textAlign(CENTER, CENTER);` AFTER your call to **text()**! 😶

---

<div class="post-metadata">

### Author: ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)
#### Post date: [June 26, 2018, 1:19am UTC](https://discourse.processing.org/t/help-with-code-project/1219/4 "2018-06-26T01:19:12Z")

</div>

After you figure this part and if you are looking for a bonus challenge, I suggest you make your text a rolling banner that goes from right to left, for instance.

Kf

---

<div class="post-metadata">

### Author: ![Jewlz0205](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@Jewlz0205](https://discourse.processing.org/u/Jewlz0205)
#### Post date: [June 26, 2018, 9:03am UTC](https://discourse.processing.org/t/help-with-code-project/1219/5 "2018-06-26T09:03:19Z")

</div>

Thank you for your help and the tip about where to post the code next 🙂
