Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:00, puppylove899
Which is the correct sequence of steps to set up a document in landscape orientation? a. select page setup from the file menu. then click the margins tab and select landscape. b. select page setup from the edit menu. then click the margins tab and select landscape. c. select page setup from the insert menu. then click the margins tab and select landscape. d. select page setup from the format menu. then click the margins tab and select landscape
Answers: 1
image
Computers and Technology, 23.06.2019 16:30, mirmir62
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
image
Computers and Technology, 24.06.2019 17:40, orlandokojoasem1234
Write an assembly language program to input a string from the user. your program should do these two things: 1. count and display the number of words in the user input string. 2. flip the case of each character from upper to lower or lower to upper. for example if the user types in: "hello there. how are you? " your output should be: the number of words in the input string is: 5 the output string is : hello there. how are you?
Answers: 2
image
Computers and Technology, 24.06.2019 21:00, gabrielaperezcz
How does a vaccine prevent sickness and individual?
Answers: 2
Do you know the correct answer?
You've been asked to write several functions. Here they are:

yourName() -- this function...

Questions in other subjects:

Konu
Social Studies, 06.10.2019 21:00