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
Kitty [74]
4 years ago
7

Write two functions var_input() and volume(), where var_input() accepts the input of the radius of a sphere and volume() returns

the volume of the sphere up to 4 decimal points.
Computers and Technology
1 answer:
astra-53 [7]4 years ago
6 0

Answer:

Program :

def var_input(): #input function which takes the radius as input.

 radius= float(input("Enter the radius of the sphere")) #statemet to take the inputs.

 volume(radius)  /#call the volume function.

def volume(radius):  #definition of volume function.

   print("The volume of the sphere is :"+"{:.2f}".format((4/3)*(22/7)*radius*radius*radius)) # print the volume of the sphere.

var_input() # calling the input function.

Output:

  • If the user inputs 4, then he will gets "268.19" as the output.
  • If the user inputs 5, then he will gets "523.81" as the output.

Explanation:

  • The above code is in python language, in which the first line is used to call the function.
  • Then the first line of the input function is used to render the message to the user and take the inputs from the user and store it into the radius variable.
  • Then the second line calls the volume function by passing the radius value.
  • Then the volume function calculates the volume and prints it.
You might be interested in
Select the answer that best describes the activity
Anastasy [175]

Answer:

software piracy

Explanation:

8 0
3 years ago
Read 2 more answers
The most common cause of foodborne illness is
nignag [31]

Answer:

Food posioning

Explanation:

8 0
4 years ago
Read 2 more answers
The spoken version of your company's purpose is called
beks73 [17]

Answer:

The answer to this question is given below in the explanation section. The correct answer is A

Explanation:

The spoken version of the company's purpose is also called an elevator pitch. because it has to be short enough to fit into a conversation that takes place on an elevator.

however the other options are not correct that tells the purpose of a company, because the vision statement shows what you will be at what stage in next coming year (in terms of growth, product /services etc). Your values are about what uniqueness you have in your product/service etc that you are providing to your customers/clients. While differentiation is not a spoken version of your company.

7 0
4 years ago
Just as you can learn to drive a car without knowing much about car engines, you can learn to use a computer without understandi
Murrr4er [49]
Yes you can but it helps to understand the technical details so if there is ever an issue you could identify and fix said issue easier.
8 0
3 years ago
You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is
cupoosta [38]

Answer:

Explanation:

The following program is written in Java. It takes 5 inputs of int values for the ages of each member in the group. Then it loops through all of the ages and chooses the youngest age. Finally, it applies that age as a discount to the final price which would be $50, outputting the final discounted price. The output for the test case provided can be seen in the attached picture below in red.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int[] person = new int[5];

       System.out.println("Enter age of individual 1: ");

       person[0] = in.nextInt();

       System.out.println("Enter age of individual 2: ");

       person[1] = in.nextInt();

       System.out.println("Enter age of individual 3: ");

       person[2] = in.nextInt();

       System.out.println("Enter age of individual 4: ");

       person[3] = in.nextInt();

       System.out.println("Enter age of individual 5: ");

       person[4] = in.nextInt();

       int youngest = person[0];

       for (int x = 0; x < person.length; x++) {

           if (person[x] < youngest) {

               youngest = person[x];

           }

       }

       double discount = 1 - (((double)youngest) / 100);

       double output = 50 * discount;

       System.out.println("Total Price: " + output + " the youngest is " + youngest);

   }

}

8 0
3 years ago
Other questions:
  • If you use the ___ template, as opposed to a formatted theme, you must make all design decisions?
    15·1 answer
  • A certain programming language uses 4-bit binary sequences to represent nonnegative integers. For example, the binary sequence 0
    9·1 answer
  • Simpson is trying to solve an equation related to converting a decimal number to its hexadecimal form. He decides to utilize the
    6·1 answer
  • What is a palindrome?
    13·1 answer
  • 6.6 Write a function named timesTen. The function should have an integer parameter named number. When timesTen is called, it sho
    7·1 answer
  • GUIs provide all of the following except _____.. a.command prompts. b.desktops. c.icons. d.menus
    5·2 answers
  • What does phishing mean?
    9·2 answers
  • What is a quasi vpn?
    14·1 answer
  • Is a pocket watch consider a computer
    15·1 answer
  • Identify the technique to free up the CPU by allowing device controllers to independently transfer data between the device and m
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!