Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Learning Objectives Associated With This Homework: - Variable Assignment - Simple Expressions - Calling Functions - Defining Functions - Printing and String Formatting You will

Learning Objectives Associated With This Homework: - Variable Assignment - Simple Expressions - Calling Functions - Defining Functions - Printing and String Formatting

You will write a python functions for practice with the language. All functions will use the INPUT function to get input data from the user and the PRINT function to display output to the user.

Function Name: coneSurfaceArea Write a user-interactive function to calculate the volume of a cone. 1. Get the slant height and radius of the circle at the base of the cone, and the unit of measurement of the cone from the user; make sure to use a descriptive prompt so the user knows what to enter. Your prompt for the slant height should include the word height, your prompt for the radius should include the word radius and your prompt for the unit(s) of measurement should include the word unit. 2. Calculate the surface area of the cone using the following formula: SurfaceArea = pi * radius2 + pi * radius * slantHeight. 3. Print the calculated surface area with 3 digits after the decimal place; be sure to add a label to display value so the user knows what the value means with the units entered by the user (e.g. display Surface Area of the cone is 35.322 units-squared instead of just 35.322, where units would be replaced with whatever unit of measurement the user entered).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions