1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
shusha [124]
3 years ago
8

Write an interactive program to calculate the volume and surface area of a three-dimensional object.

Computers and Technology
1 answer:
bagirrra123 [75]3 years ago
5 0

Answer:

I am writing a Python program:

pi=3.14 #the value of pi is set to 3.14

radius = float(input("Enter the radius of sphere: ")) #prompts user to enter the radius of sphere

surface_area = 4 * pi * radius **2 #computes surface area of sphere

volume = (4.0/3.0) * (pi * radius ** 3) #computes volume of sphere

print("Surface Area of sphere is: ", surface_area) #prints the surface area

print("Volume of sphere is: {:.2f}".format(volume)) #prints the volume        

Explanation:

Please see the attachment for the complete interactive code.

The first three lines of print statement in the attached image give a brief description of the program.

Next the program assigns 3.14 as the value of π (pi). Then the program prompts the user to enter the radius. Then it computes the surface area and volume of sphere using the formulas. Then it prints the resultant values of surface area and volume on output screen.

The psuedocode for this program is given below:

PROGRAM SphereVolume

pi=3.14

NUMBER radius, surface_area, volume  

INPUT radius

COMPUTE volume = (4/3) * pi* radius ^3

COMPUTE surface_area = 4 * pi * radius ^ 2

OUTPUT volume , surface_area

END

You might be interested in
Kate saves her work on a secondary storage device that is fairly new, and uses flash technology instead of disks.
almond37 [142]

Answer:

B.) SSD

Explanation:

I hope I helped! ^-^

8 0
3 years ago
Can someone be my friend,don't friend me until i ask you Questions
Semmy [17]

Answer:

Explanation:

actually you suck. nevermind.

3 0
3 years ago
In a particular jurisdiction, taxi fares consist of a base fare of $4.00, plus $0.25 for every 140 meters traveled. Write a func
devlian [24]

Answer:

// here is code in java.

import java.util.*;

// class definition

class Main

{

// method that return total fare

   public static double fare(double dis)

   {

   // calculate the total fare

       double tot_fare=(4+((dis*1000)/140)*0.25);

       return the fare

       return tot_fare;

   

   }

   //driver method

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object to read input string

       Scanner s=new Scanner(System.in);

        // variable

       double dis;

       System.out.print("please enter the distance in KM: ");

       //read the number

       dis=s.nextDouble();

       

       // call the function with "dis" parameter

     double ride_fare=fare(dis);

     // print the total fare

     System.out.println("total fare is: "+ride_fare);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the distance from user with the help of scanner class.Call the function with parameter "dis".Here it will calculate the total fare as (4+((dis*1000)/140)*0.25). Here base fare is $4 and $0.25 for every 140 meter.Then function will return the total fare.

Output:

please enter the distance in KM: 7                                                                                                                            

total fare is: 16.5  

7 0
3 years ago
What can be changed when a style is modified?
Gwar [14]

Answer:

Font

no hate If I'm wrong :)

3 0
3 years ago
Read 2 more answers
To open computer manger you would
Irina18 [472]
"start", "control panel", "administrative tools", "computer management" thats it
8 0
3 years ago
Other questions:
  • 7.14 LAB: Word frequencies Write a program that reads a list of words. Then, the program outputs those words and their frequenci
    10·1 answer
  • What is an optimal Huffman code for the following set of frequencies, based on the first 8 Fibonacci numbers?
    8·1 answer
  • Create a simple self-checkout system. Prompt for the prices and quantities of three items. Calculate the subtotal of the items.
    15·1 answer
  • How can I get answers on Collage Board for AP classes when using the inspect element? (AP WORLD HISTORY)
    13·1 answer
  • Plz answer me will mark as brainliest ​
    8·1 answer
  • What are the most positive and the most negative decimal numbers that can be represented by a 2C (n+k) bit fixed-point number, w
    12·1 answer
  • Of all excavation hazards, _______ poses the greatest risk
    8·1 answer
  • Imagine you’re at lunch. Your nose smells pizza. Your legs move over to where hot lunch is being served. You have to balance the
    9·2 answers
  • Differentiate between soft copy output and hard copy output?​
    12·2 answers
  • An Accenture healthcare client is interested in implementing an Artificial Intelligence (AI) solution to improve patient care, b
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!