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
A and B have same output or not? A B x=0 x=0 do do x<3 x=x+1 x=x+1 print x print x while x<3 while
katen-ka-za [31]

Answer:

A and B have different output:

A output will be 1

B output will be 123

Explanation:

A

X = 0

do x < 3

x = x+1

print x

while

B

X = 0

do x = x+ 1

print x

while x < 3

For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.

For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.

Statement A output will be 1

Statement B output will be 123

6 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Kamila [148]

Answer:emphasis

Explanation:

7 0
2 years ago
Which of the following plug-ins was developed by microsoft and is a software development tool used to write and run internet app
Elodia [21]
I'm not a hundred percent sure but maybe silverlight?
5 0
3 years ago
In 2009 to 2010, how many social network users were reported as being victims of online abuse?
Dafna1 [17]
The answer is B because being victims of online abuse is not important
7 0
3 years ago
Read 2 more answers
When performing the ipconfig command, what does the following output line depict if found in the tunnel adapter settings?
Andrew [12]

Answer:

d. IPv4 Address 192.168.0.4 is associated with the globe IPv6 address 2001:db8:0:10:0:efe

Explanation:

The adapter setting will be associated with the global IP address. When Ipconfig command is operate the IP address finds the relevant domain and then address will use a different subnet. The network will use both IPv4 and IPv6 subnets in order to execute the command.

8 0
2 years ago
Other questions:
  • Write a Python program that will take as input 5 integer values and will output the average of the odd values and the average of
    6·1 answer
  • What is UNIX? A program for writing documents Graphical interface Internet browser Operating system
    8·2 answers
  • Which are Career and Technical Student Organizations? (Check all that apply.)
    12·1 answer
  • Which statement best describes a transition in PowerPoint?
    12·1 answer
  • In the event you get pulled over for a traffic stop, describe the situation from the police officer's perspective and list at le
    6·2 answers
  • What do you need to do before you can sort and filter data in a data base?
    12·1 answer
  • Can you please answer the question in the picture ! :)
    6·1 answer
  • What is the alogarithm for solving the perimeter of a triangle
    11·1 answer
  • Virus program do not replicate themselves true or false one word answer only​
    15·2 answers
  • By what decade were books readily available to the public across the United States and Europe?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!