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
MissTica
3 years ago
7

Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimete

rs) specified as a floating point value. The program then echoes the input and computes areas of squares and circles and the volume of a cube. For the squares, you will assume that the input length value is the length of a side. For the circles, this same value becomes the diameter. Use the meter value input to calculate the results in square (or cubic) meters and then print the answers in square (or cubic) meters.
Computers and Technology
1 answer:
Svetlanka [38]3 years ago
4 0

Answer:

import math

l = float(input("Enter length in cm: "))

l = l / 100;

print("Entered length is " + str(l) + " meters")

area_square = l * l

print("Area of square is " + str(area_square))

area_circle =  math.pi * l/2 * l/2

print("Area of circle is " + str(area_circle))

volume_cube =  l * l * l

print("Volume of cube is " + str(volume_cube))

Explanation:

*The code is in Python

Ask the user to enter the length in cm

Convert the length to meters and print it

Calculate the area of the square and print it (Since length is equal to a side, the area is length * length)

Calculate the area of the circle and print it (Since length is equal to the diameter, you need to divide it by two to get the radius. The area is pi * length/2 * length/2)

Calculate the volume of the cube and print it (Since length is equal to a side, the volume is length * length * length)

You might be interested in
What does a head frame do​
coldgirl [10]

Answer:

The main objects of a head frame, or poppet head, are to support the winding pulley firmly and to guide the cage above the surface to the discharging stage. 

7 0
3 years ago
Rebecca has finished with the research and outline portion of her slide presentation now the next logical step is to begin worki
e-lub [12.9K]

Answer:

The answer is creating and layout and template style

Explanation:

APEX VERIFIED just did it

4 0
3 years ago
Read 2 more answers
Consider bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}. Can you replace #blank# so the code will print a g
Goshia [24]

Answer:

bears = {"Grizzly":"angry", "Brown":"friendly", "Polar":"friendly"}

for bear in bears:

   if bears[bear] == "friendly":

       print("Hello, "+bear+" bear!")

   else:

       print("odd")

Explanation:

A dictionary called bears is given. A dictionary consists of key-value pairs.

You need to check each key-value pairs in bears and find the ones that have "friendly" as value using a for loop and if-else structure. In order to access the values of the dictionary, use the dictionary name and the key (inside the loop, the key is represented as bear variable). If a key has a value of "friendly", print the greeting. Otherwise, print "odd".

6 0
3 years ago
Dawn is trying to find out how much weight she can push across the room. She is really trying to find her __________. A. flexibi
Marrrta [24]

<em>The correct answer is d. muscular strength.</em>

<em></em>

<em>Explanation :</em>

<em></em>

<em>The maximal force a muscle can create when it contracts is referred to as muscular strength. When compared to someone with lower physical strength, someone with better muscular strength can lift heavier weights. Lifting progressively larger weights over time and eating a diet rich in protein-based foods can help a person's physical strength gradually grow.</em>

<em></em>

<em>I hope this helps. Please mark "Brainliest" if you can.</em>

8 0
2 years ago
Write a function named power that accepts two parameters containing integer values (x and n, in that order) and recursively calc
lianna [129]

Answer:

Following are the code to the given question:

int power(int x, int n)//defining a method power that accepts two integer parameters

{

if (n == 0)//defining if block to check n equal to 0

{

return 1; //return value 1

}

else//defining else block

{

x = x * power(x, --n); //use x variable to call method recursively

}

return x; //return x value

}

Explanation:

In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:

  • In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.
  • In the else block, an integer variable x is defined that calls the method recursively and return x value.
8 0
3 years ago
Other questions:
  • Problem 1 (Authentication): Consider the following authentication protocol, which uses a classical cryptosystem. Alice generates
    5·1 answer
  • What can be determined from this selection? Check all that apply. The Tax Info worksheet is currently being viewed. There are th
    6·2 answers
  • ____ policy establishes criteria for classifying and securing the organization's information in a manner appropriate to its leve
    6·1 answer
  • Using Turtle Graphics, write a program that will produce 2 Zs next to each other. It is irrelevant where these Zs appear and wha
    10·1 answer
  • Describe the positive and negative effects of Internet​
    6·2 answers
  • 1. What are copyright laws? (6 points)
    15·1 answer
  • All of the following are eras in IT infrastructure evolution except the​ ________. A. general purpose mainframe and​ mini-comput
    12·1 answer
  • Pls help I will give points
    7·1 answer
  • I NEED HELP QUICK
    9·1 answer
  • Write a 20 charecter poem! for points! :)
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!