Function 3: Volume of Cylinder function _three (radius, height) Create a JavaScript function that meets the following requirements: Receives two parameters, one representing a radius value, the other a height value o The function can safely assume, all parameters passed are represented in meters (m). The function calculates the volume of a cylinder and returns the value back to its caller. • The function always displays the calculated volume, rounded to two significant digits • The function displays the calculated information (console log) as illustrated below: The function returms the calculated volume back to the caller Calling _three(5, 25) The calculated volume is: 1963.50 Calling _three(0, 25) The calculated volume is: 0.00 Calling _three(-5, 25) Radius and height must be greater than 0

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter2: Formatting Workbook Text And Data
Section: Chapter Questions
Problem 4RA
icon
Related questions
Question

Write this using a java script function and test  with  a mocha or postman to see if it passes the test

2 COMP1231 - Assignment 2(2).pdf - Adobe Reader
File Edit View Window Help
Оpen
5
/ 8
173%
Tools
Fill & Sign
Comment
Sign In
v Export PDF
Adobe ExportPDF
Convert PDF files to Word or Excel
online.
Select PDF File:
4 COMP1231 - Assignment 2(...
Function 3: Volume of Cylinder
1 file / 285 KB
Convert To:
Microsoft Word (*.docx)
function
three (radius, height)
Recognize Text in English(U.S.)
Change
Create a JavaScript function that meets the following requirements:
Convert
Receives two parameters, one representing a radius value, the other a height value
• Create PDF
The function can safely assume, all parameters passed are represented in meters (m).
• Edit PDF
The function calculates the volume of a cylinder and returns the value back to its caller.
• Combine PDF
• Send Files
The function always displays the calculated volume, rounded to two significant digits
• Store Files
The function displays the calculated information (console log) as illustrated below:
The function returns the calculated volume back to the caller
Calling _three(5, 25)
The calculated volume is: 1963.50
Calling _three(0, 25)
The calculated volume is: 0.00
Calling _three(-5, 25)
Radius and height must be greater than 0
Transcribed Image Text:2 COMP1231 - Assignment 2(2).pdf - Adobe Reader File Edit View Window Help Оpen 5 / 8 173% Tools Fill & Sign Comment Sign In v Export PDF Adobe ExportPDF Convert PDF files to Word or Excel online. Select PDF File: 4 COMP1231 - Assignment 2(... Function 3: Volume of Cylinder 1 file / 285 KB Convert To: Microsoft Word (*.docx) function three (radius, height) Recognize Text in English(U.S.) Change Create a JavaScript function that meets the following requirements: Convert Receives two parameters, one representing a radius value, the other a height value • Create PDF The function can safely assume, all parameters passed are represented in meters (m). • Edit PDF The function calculates the volume of a cylinder and returns the value back to its caller. • Combine PDF • Send Files The function always displays the calculated volume, rounded to two significant digits • Store Files The function displays the calculated information (console log) as illustrated below: The function returns the calculated volume back to the caller Calling _three(5, 25) The calculated volume is: 1963.50 Calling _three(0, 25) The calculated volume is: 0.00 Calling _three(-5, 25) Radius and height must be greater than 0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning