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
Ne4ueva [31]
3 years ago
9

The volume of a sphere is 4/3πr3, where π has the value of "pi". Write a function called print_volume (r) that takes an argument

for the radius of the sphere, and prints the volume of the sphere.
Call your print_volume function three times with different values for radius.
Computers and Technology
1 answer:
Marizza181 [45]3 years ago
6 0

Answer:

In Python:

def print_volume (r):

   volume = 4/3 * 3.142*r**3

   print(volume)

print_volume(7)

print_volume(14)

print_volume(22)

Explanation:

This defines the function and takes radius r as the parameter

def print_volume (r):

This calculates the volume

   volume = 4/3 * 3.142*r**3

This prints the volume

   print(volume)

The next three lines call the function with different values

<em>print_volume(7)</em>

<em>print_volume(14)</em>

<em>print_volume(22)</em>

You might be interested in
What does an effect allow you to do in<br> EarSketch?
Gnoma [55]

Answer:usbebdos did did I’d did d

Explanation:

Bash six ska over five. I did a sis a and

7 0
3 years ago
Which feature was the first app available on a cell phone? A. Game B.contact list C.email D.ringtone
Oduvanchick [21]

Before cellphones are able to be used to browse the internet, play games, record videos and take photos, its main purpose is similar to a telephone, albeit it is more portable. Early cellphones would not have games for you to play, not would it have emails for you to check, read, and reply to. Though ringtones might seem as an acceptable option, early cellphones would also have many selections or even any for you to choose.

Thus, the best option would be (B) contact list, which is necessary for a cellphone to have since the owner would need the number to be able to make a call.

8 0
3 years ago
A) Write a class Card. A Card has the following private attributes:
Over [174]

Answer:

Java.

Explanation:

public class Card

{

   String Suit;

   int value;

   public Card(int value, String Suit) {

       self.value = value;

       // Check Suits value

       if ((Suit == "hearts") || (Suit == "spades") || (Suit == "clubs") || (Suit == "diamonds"))

           self.Suit = Suit;

       else {

           Suit = "none";

           throw new IllegalArgumentException("no card of this type exists.");  

        }

   }

   public String getSuit() {

       return Suit;

   }

   public int getValue() {

       return value;

   }

 

   public void print() {

       System.out.println("%d of %s", value, Suit);

   }

}

public class Deck {

}

6 0
3 years ago
a) Write out an abstract class to represent a ball. Include data fields to store the weight of the ball as a double value and th
guapka [62]

Answer:

Check the explanation

Explanation:

//Ball.java

public abstract class Ball {

   double value;

   String color;

   public Ball() {

   }

   public Ball(double value, String color) {

       this.value = value;

       this.color = color;

   }

   public abstract void howToPlay();

}

////////////////////////////////////////////

//SoccerBall.java

public class SoccerBall extends Ball {

   public void howToPlay() {

       System.out.println("Description to how to play soccer ball");

   }

}

7 0
3 years ago
Read 2 more answers
What is motherboard ?​
PtichkaEL [24]

Answer:

A motherboard is the main printed circuit board in general-purpose computers and other expandable systems. It holds and allows communication between many of the crucial electronic components of a system, such as the central processing unit and memory, and provides connectors for other peripherals

4 0
3 years ago
Other questions:
  • All of the following except one are issues that should be covered in an AUP. Which one is the exception?
    5·1 answer
  • Which step can most directly help your team follow up on decisions made during Web development meetings?This task contains the r
    6·1 answer
  • Columns are most useful for which tasks ?
    12·1 answer
  • What is the meaning of delegation
    13·2 answers
  • A business would use a website analytics tool for all of the following EXCEPT _____.
    9·1 answer
  • If you copy a drawing from the Internet and use it in a report, you might be violating the artist's
    8·1 answer
  • Explain how to utilize the computer in rooms management.​
    13·1 answer
  • Cable Internet access can be described with which feature?
    5·2 answers
  • Look at the picture ​
    13·2 answers
  • 4. Contoso, Ltd. has a vigorous Office 365 and Azure cloud-service presence.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!