Mitchell S.

asked • 04/15/20

I need help with this programming question

You've been asked to write several functions. Here they are:

yourName() -- this function takes no parameters. It returns a string containing YOUR name. For example, if Homer Simpson wrote this function it would return "Homer Simpson"

quadster(m) -- this function takes a value m that you pass it then returns m times 4. For example, if you passed quadster the value 7, it would return 28.

isRratedMovieOK(age) -- this function takes a value age that you pass it. If the age is greater than or equal to 17 the function returns True, otherwise it returns False. Make sure 17 is stored as a named constant.

Your program must contain a Main() function as shown in the chapter. In your Main() function CALL each of your functions to demonstrate that they work properly.

Important note: Your functions themselves should not produce any output. Instead, they use the contents of their input parameters to return a value to the code that called the function. The code that called the function is the one that should be doing the output (in this program, the code that calls the functions is in Main() so that's the only place one should see any output statements).


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.