# PLEASE HELP: creating a generator (astro signs)

**URL:** <https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933>\
**Category:** Processing.py\
**Tags:** homework\
**Created:** [March 28, 2021, 11:12pm UTC](https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933 "2021-03-28T23:12:06Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [March 29, 2021, 5:23am UTC](https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933/6 "2021-03-29T05:23:49Z")

</div>

To load an image instead of display some text, you can use an `image()` function:

```python
day = 23
month = 'december'

if month == 'december':
    x = 'sagittarius.png' if (day < 22) else 'capricorn.png'
...

image(loadImage(x), 0, 0)

```

Note that the `x` value is now assigned to a file name (with a `.png` extension).

---

_[View the full topic](https://discourse.processing.org/t/please-help-creating-a-generator-astro-signs/28933)._
