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
Which of the following common software packages would help a business
Jobisdone [24]

Answer:

D. Spreadsheets

Explanation:

While A also seems correct, a spreadsheet is best at collecting and organizing data. Databases would only store data while a spreadsheet would keep those records, as well as help calculate a budget or payroll.

3 0
2 years ago
For an alternative to the String class, and so that you can change a String's contents, you can use_________ .
mr_godi [17]

Answer:

c. StringBuilder

Explanation:

An alternative to the String class would be the StringBuilder Class. This class uses Strings as objects and allows you to mix and match different strings as well as adding, removing, implementing,  and modifying strings themselves as though they were similar to an array. Unlike the string class StringBuilder allows you to modify and work with a combination of strings in the same piece of data as opposed to having various objects and copying pieces which would take up more memory.

7 0
3 years ago
Which type of information could be displayed using this line graph?
ollegr [7]

Answer:

The first one I'm sorry if I'm wrong

3 0
2 years ago
Read 2 more answers
Maeve has created the website, but she is not able to include more than one blank space at a time. Even if she hits the SPACE bu
GenaCL600 [577]

Answer:

For the browser to display multiple spaces, Maeve must use   in her code to create more spaces.

Explanation:

  is known as hard space or fixed space. NBSP stands for Non-Breaking Space. The statement will continue without breaking into another line.

Maeve can easily use the   many times to get the required space she needs.

5 0
3 years ago
Write a program which will -
Hitman42 [59]

Answer:

down below

Explanation:

score = input() # gets student's score input

max = input() # gets max number

percent = (score/max)*100 # multiply by a hundred to get percentage

if percent > 52: # checks if percent is greater than 52

  print("well dont you have at least a grade 5")

else # if percent is less than or equal to 52 it will print this instead

  print("Unlucky, you need to revise more for the next test.")

THIS PART IS NOT CODE:

make sure you indent/tab the print statements or else you'll get an error

6 0
2 years ago
Other questions:
  • Electrical pressure is also called
    5·2 answers
  • You have a Nano Server named Nano1. Which cmdlet should you use to identify whether the DNS Server role is installed on Nano1
    12·1 answer
  • Why would you use a billeted list in a slide presentation?
    11·1 answer
  • What is the missing line of code?
    7·1 answer
  • Explain any 10uses of computer that are specific to your field of study giving appropriate examples​
    13·1 answer
  • You are required to copy in your attendees' emails from outside of Outlook when creating a meeting
    6·2 answers
  • The cat store needs your help! The base class Animal has private fields animalName, and animalAge. The derived class Cat extends
    9·1 answer
  • A user calls to complain that her computer is behaving erratically. Some days it functions correctly, and other days, it crashes
    15·1 answer
  • James root lol ........................
    12·1 answer
  • Design a circuit that will tell whether a given month has 30 days in it.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!