## The area of a rectangle is calculated according to the following formula: Area=Width X Length Design a function that accepts a rectangle's width and length as arguments and returns the rectangle's area.

### computer science

##### Description

1.       The area of a rectangle is calculated according to the following formula:     Area=Width X Length     Design a function that accepts a rectangle's width and length as arguments and returns the rectangle's area. Use the function in a program that prompts the user to enter the rectangle's width and length, and then displays the rectangle's area.

2.       Write a program that gives simple math quizzes. The program should display two random

numbers that are to be added, such as:

247+129

The program should allow the student to enter the answer. If the answer is correct, a message

of congratulations should be displayed. If the answer is incorrect, a message showing

the correct answer should be displayed.

3.       Write a program that asks the user to enter five test scores. The program should display a

letter grade for each score and the average test score. Write the following functions in the

program:

calcAverage—This function should accept five test scores as arguments and return the average of the scores.

determineGrade—This function should accept a test score as an argument and return a letter grade for the score based on the following grading scale:

90–100                                                  A

80–89                                                    B

70–79                                                    C

60–69                                                    D

Below 60                                              F

## Related Questions in computer science category

##### Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.