subject

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).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Determine whether the following careers would require training or college.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which text format is this, "the text is transcribed exactly as it sounds and includes all the utterances of the speakers. "?
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
You know the right answer?
You've been asked to write several functions. Here they are:

yourName() -- this function...
Questions
question
Mathematics, 06.05.2020 02:22
question
Law, 06.05.2020 02:22
Questions on the website: 13722367