Over a million developers have joined DZone.

Code Golf: Smile!

· IoT Zone

Access the survey results 'State of Industrial Internet Application Development' to learn about latest challenges, trends and opportunities with Industrial IoT, brought to you in partnership with GE Digital.

When it comes to ingenuity, Code Golf is my absolute favorite thing in the developer space. Code Golf, like the game of golf, is an exercise in brevity - the fewest lines of code and the smaller the file size, the better. It requires creativity, knowledge of your craft, and perseverance.

So in order to showcase the brightest members of our community, DZone will be holding a weekly Code Golf competition.

What's in it for you? The winner every week will receive some awesome DZone swag!

In order to submit your entry, you'll need to leave a comment with your code (using the code feature), as well as what language you used. Your code must be completely self-contained (don't reference code external to your own!).

So, let's get started!

This week's challenge:

This week's challenge should put a smile on your face - or at least on your computer screen. It's simple, you'll need to create an ASCII smile that has two eyes and a mouth. Your output should look like this:

   0 0 0 0
0  . .  0
0  \_/  0
   0 0 0 0

The code with the fewest characters (INCLUDING whitespace) will be the winner! You must submit your code by Tuesday, March 31st. The winner will be announced in our Newsletter!

Sound like something you can handle? We'd like to see you try.

Happy coding!


The IoT Zone is brought to you in partnership with GE Digital.  Discover how IoT developers are using Predix to disrupt traditional industrial development models.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}