Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
You are working as a software developer on NASA's Mars Explorer robotic rover project. You need to implement some code to compute the
surface area of the 3D, tube-shaped part shown below: a cylinder of radius r and height h (in units centimeters) with a hollowed-out center also
in the shape of a cylinder with radius n and height h (also in cm). Both the outside and the inside of the tube will need to be coated in a thin
layer of gold, which is why we need to know its surface area. Write code that will compute and print the total surface area of the shape.
<>
n
esc
r
Examples:
Inputs
r = 10, n = 8.5, h = 22.5
r = 9.25, n = 6.8, h
r = 4.15, n = 3.9, h = 11.7
= 12.16
X
h
Output Value
2789.7342763877364
1473.347264273195
604.4267185874082
2
3
80
F3
000
DO
F4
✓0
F5
完成时间:18:42
PNEUE
MacBook Air
F6
F7
DII
F8
tv
8
F9
F10
F
expand button
Transcribed Image Text:You are working as a software developer on NASA's Mars Explorer robotic rover project. You need to implement some code to compute the surface area of the 3D, tube-shaped part shown below: a cylinder of radius r and height h (in units centimeters) with a hollowed-out center also in the shape of a cylinder with radius n and height h (also in cm). Both the outside and the inside of the tube will need to be coated in a thin layer of gold, which is why we need to know its surface area. Write code that will compute and print the total surface area of the shape. <> n esc r Examples: Inputs r = 10, n = 8.5, h = 22.5 r = 9.25, n = 6.8, h r = 4.15, n = 3.9, h = 11.7 = 12.16 X h Output Value 2789.7342763877364 1473.347264273195 604.4267185874082 2 3 80 F3 000 DO F4 ✓0 F5 完成时间:18:42 PNEUE MacBook Air F6 F7 DII F8 tv 8 F9 F10 F
You are working as a software developer on NASA's Mars Explorer robotic rover project. You need to implement some code to compute the
surface area of the 3D, tube-shaped part shown below: a cylinder of radius r and height h (in units centimeters) with a hollowed-out center also
in the shape of a cylinder with radius n and height h (also in cm). Both the outside and the inside of the tube will need to be coated in a thin
layer of gold, which is why we need to know its surface area. Write code that will compute and print the total surface area of the shape.
<>
n
esc
r
Examples:
Inputs
r = 10, n = 8.5, h = 22.5
r = 9.25, n = 6.8, h
r = 4.15, n = 3.9, h = 11.7
= 12.16
X
h
Output Value
2789.7342763877364
1473.347264273195
604.4267185874082
2
3
80
F3
000
DO
F4
✓0
F5
完成时间:18:42
PNEUE
MacBook Air
F6
F7
DII
F8
tv
8
F9
F10
F
expand button
Transcribed Image Text:You are working as a software developer on NASA's Mars Explorer robotic rover project. You need to implement some code to compute the surface area of the 3D, tube-shaped part shown below: a cylinder of radius r and height h (in units centimeters) with a hollowed-out center also in the shape of a cylinder with radius n and height h (also in cm). Both the outside and the inside of the tube will need to be coated in a thin layer of gold, which is why we need to know its surface area. Write code that will compute and print the total surface area of the shape. <> n esc r Examples: Inputs r = 10, n = 8.5, h = 22.5 r = 9.25, n = 6.8, h r = 4.15, n = 3.9, h = 11.7 = 12.16 X h Output Value 2789.7342763877364 1473.347264273195 604.4267185874082 2 3 80 F3 000 DO F4 ✓0 F5 完成时间:18:42 PNEUE MacBook Air F6 F7 DII F8 tv 8 F9 F10 F
Expert Solution
Check Mark
Step 1

Algorithm:

1. Define a function that takes three parameters (r, n, h).
2. Calculate the surface area of the outer cylinder using the formula provided.
3. Return the value of the calculation.
4. Call the function with the given test cases.

Knowledge Booster
Background pattern image
Computer Science
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
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education