WSQ08 – On To Functions

What to Do

creative commons licensed (BY) flickr photo by kevin dooley:

creative commons licensed (BY) flickr photo by kevin dooley:

You will go back and do WSQ03 – Fun with Numbers again.

But this time, write a function for each calculation. Each function should define two parameters (in this example of type int) and return the correct value as an integer as well.

You main program needs to ask the user for the input and then call each function to calculate the answer for each of the parts.

What to Submit

As usual, create a blog post explaining what you did, where you found resources (books, videos, web pages, friends) to help you solve this. Remember to put the tag WSQ08 on your post so our blog hub picks that up.

You should include your code either inline in the blog post (best option) and/or a link to your actual code on Dropbox/Google Drive/GitHub.

If you have not seen my video yet about the GUI tutorial for GitHub, go check that out:

And of course, leave any questions here as well as asking those questions on Twitter with the hashtag #TC1017 so we all see your question posted there.

CC BY 4.0 WSQ08 – On To Functions by Ken Bauer is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.