Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart for a computer program to receive two numbers and output the larger one. Assume the two number are not same. Convince yourself that both versions work correctly. Ex2) Ex 3) Ex 4) 22w Lab04 N-convert... Page 2 of 8 Ex 5) draw a flowchart for a computer program to receive two numbers as sides of a rectangle and output the rectangle's perimeter, in the form of "Perimeter: x" where x is the perimeter. Save your work as img_01.jpg draw a flowchart for a computer program to receive three numbers and store them in memory spaces called a, b, and c as three semi-axes of an ellipsoid, and calculate and output the volume of this ellipsoid, in the form of "volume: x" where x is the volume. Figure out the formular from the internet. Save your work as img_02.jpg draw a flowchart for a computer program to receive three floating point numbers and store them in memory spaces called a, b, and c, and return the largest number of the three, in the form of "largest: x" where x is the largest value. Assume the three number are all different. Hint: you can compare pair of the values and there are several cases to consider, but a simpler way to compare is, as you see in the SMQ1, check if a is larger than b AND also is larger than c. If yes you got the answer. If not (else), check if b is larger than a AND also larger than c, if yes you got answer, if not, you also got the answer. If.... else if.... else should be enough. Save your work as img_03.jpg draw a flowchart to receive three numerical coefficients of a quadratic equation and determines if it has two distinct real roots, one root, or no roots in real numbers, output "it has 2 distinct roots, "its roots are identical", "it has no roots in real numbers" respectively. This page might be a good reference: https://www.math10.com/en/algebra/quadratic-equation.html Save your work as img_04.jpg assume there is a webpage containing an HTML input of type text and a button. When the button is clicked, a function named divisible By6 is called. Draw a flowchart for the function, that receive a number, and first check whether the input is divisible by 6 or not, outputting "divisible by 6" or "not divisible by 6", respectively. Then, further check if the input is zero, and if it is zero, also outputs "program ended". Hint: you need two if clauses, one after another. First check if the input is divisible by 6, and output accordingly, and then check if the input is 0 or not. Save your work as img_05.jpg. IMPORTANT RESTRICTION: you are not allowed to use the modulus 6 to verify the remainder whether the number is divided by 6. You can do any other math trick you wish. Ex 6A) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use if.. else if.. else if... You may need to look at this reference: http://calendars.registrar.yorku.ca/2012-2013/academic/grades/index.htm To simplify, assume no letter grade E, i.e., if the grade is below 50, it's mapped to F. Save your work as img_06A.jpg. Ex 6B) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use the "many case" style shown in class (which corresponds to switch cases struct in JS programming language). Again assume no letter grade E. Save your work as img_06B.jpg. Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart for a computer program to receive two numbers and output the larger one. Assume the two number are not same. Convince yourself that both versions work correctly. Ex2) Ex 3) Ex 4) 22w Lab04 N-convert... Page 2 of 8 Ex 5) draw a flowchart for a computer program to receive two numbers as sides of a rectangle and output the rectangle's perimeter, in the form of "Perimeter: x" where x is the perimeter. Save your work as img_01.jpg draw a flowchart for a computer program to receive three numbers and store them in memory spaces called a, b, and c as three semi-axes of an ellipsoid, and calculate and output the volume of this ellipsoid, in the form of "volume: x" where x is the volume. Figure out the formular from the internet. Save your work as img_02.jpg draw a flowchart for a computer program to receive three floating point numbers and store them in memory spaces called a, b, and c, and return the largest number of the three, in the form of "largest: x" where x is the largest value. Assume the three number are all different. Hint: you can compare pair of the values and there are several cases to consider, but a simpler way to compare is, as you see in the SMQ1, check if a is larger than b AND also is larger than c. If yes you got the answer. If not (else), check if b is larger than a AND also larger than c, if yes you got answer, if not, you also got the answer. If.... else if.... else should be enough. Save your work as img_03.jpg draw a flowchart to receive three numerical coefficients of a quadratic equation and determines if it has two distinct real roots, one root, or no roots in real numbers, output "it has 2 distinct roots, "its roots are identical", "it has no roots in real numbers" respectively. This page might be a good reference: https://www.math10.com/en/algebra/quadratic-equation.html Save your work as img_04.jpg assume there is a webpage containing an HTML input of type text and a button. When the button is clicked, a function named divisible By6 is called. Draw a flowchart for the function, that receive a number, and first check whether the input is divisible by 6 or not, outputting "divisible by 6" or "not divisible by 6", respectively. Then, further check if the input is zero, and if it is zero, also outputs "program ended". Hint: you need two if clauses, one after another. First check if the input is divisible by 6, and output accordingly, and then check if the input is 0 or not. Save your work as img_05.jpg. IMPORTANT RESTRICTION: you are not allowed to use the modulus 6 to verify the remainder whether the number is divided by 6. You can do any other math trick you wish. Ex 6A) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use if.. else if.. else if... You may need to look at this reference: http://calendars.registrar.yorku.ca/2012-2013/academic/grades/index.htm To simplify, assume no letter grade E, i.e., if the grade is below 50, it's mapped to F. Save your work as img_06A.jpg. Ex 6B) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use the "many case" style shown in class (which corresponds to switch cases struct in JS programming language). Again assume no letter grade E. Save your work as img_06B.jpg.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Umida Ltd is considering acquiring Trinity Ltd. Both companies are all-equity firms. Umida and Trinity have 5 million and 6 million shares outstanding respectively. Umida generates $2 million in...
-
What are excessive benefits and what are the consequences of paying/receiving excessive benefits?
-
Cherokee Incorporated is a merchandiser that provided the following Information: Number of units sold Selling price per unit Variable selling expense per unit Variable administrative expense per unit...
-
When you should file a notice of lien?
-
Time Value of Money Concept The following situations involve the application of the time value of money concept: 1. Janelle Carter deposited $9,750 in the bank on January 1, 1993, at an interest rate...
-
The textile company produces the article PCR5, through two production departments A and B. to account for its production costs, it uses the standard cost system. The standard specification time...
-
Grano BV and Henco BV manufacture fairly similar remote-controlled toy cars. Sido BV, a retailer of children's toys, expects to buy and sell 4000 of these cars each year. Both Grano and Henco can...
-
Through the vertex O of the parabola y = 4ax, a perpendicular is drawn to any tangent meeting at P and the parabola at Q. Show that OP. OQ = constant.
-
Identifying Distressed projects with Metrics We use metrics (a standard of measurement) to control project performance. Define the metrics you would put in place as early warning signs that a project...
-
In the image are three point charges, Q = 18.4 C, Q2 = -38.6 C, and Q3 87.3 C, arranged according to the figure. A fourth point charge is located at point A with a 13.5 C. The charges form a square...
-
Caskey Inc. is experiencing a period of growth. Dividends are expected to grow at a rate of 14.00% for the next two years and 5.00% thereafter. Yesterday the corporation paid a dividend of $1.15. If...
-
Hotel Cortez is an all-equity firm that has 11,200 shares of stock outstanding at a market price of $35 per share. The firm's management has decided to issue $68,000 worth of debt and use the funds...
-
A bond with a face value of $1,081 has a semi-annual payment of $53 and matures in 4 years, 9 months, and 12 days. It is currently selling for $1,019.48. What is the coupon rate of this bond?
-
Question 38 The production function shows the relationship between the costs of inputs and the price of the output. level of outputs that maximize revenue. quantity of the labor input needed for each...
-
Refer to the Conservation Ecology (Dec. 2003) study of the causes of forest fragmentation, presented in Exercise 2.166 (p. 97). Recall that the researchers used advanced high-resolution satellite...
-
During 2012, Tom sold Sears stock for $10,000. The stock was purchased 4 years ago for $13,000. Tom also sold Ford Motor Company bonds for $35,000. The bonds were purchased 2 months ago for $30,000....
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
Sophie is a single taxpayer. For the first payroll period in October 2012, she is paid wages of $3,250 monthly. Sophie claims three allowances on her Form W-4. a. Use the percentage method to...
-
A pipe branches symmetrically into two legs of length \(L\), and the whole system rotates with angular speed \(\omega\) around its axis of symmetry. Each branch is inclined at angle \(\alpha\) to the...
-
For the rotating sprinkler of Example 4.13, what value of \(\alpha\) will produce the maximum rotational speed? What angle will provide the maximum area of coverage by the spray? Draw a velocity...
-
Compressed air is stored in a pressure bottle with a volume of \(100 \mathrm{~L}\), at \(500 \mathrm{kPa}\) absolute and \(20^{\circ} \mathrm{C}\). At a certain instant, a valve is opened and mass...
Study smarter with the SolutionInn App