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. <> B n Examples: Inputs r = 10, n = 8.5, h = 22.5 r = 9.25, n = 6.8, h= 12.16 r = 4.15, n = 3.9, h = 11.7 MUN h Output Value 2789.7342763877364 1473.347264273195 604.4267185874082 211 ✓0 完成时间:18:42 - all tv C O

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
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
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
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.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

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