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
In a two-sided tag, a(n) ____ tag indicates the content's end.
alexira [117]

Answer:

A closing tag

Explanation:

A tag in HTML is the core building block that marks the presence of an element. If the element has text or another element within it, it is marked using a two-sided tag and in which case, the opening tag indicates the content’s beginning and a closing tag indicates the end of the content

7 0
3 years ago
Read 2 more answers
To set up scenarios, you need to first use ______ to set up a list, then ______ to set up the reference cell. Last you need to u
Sholpan [36]

To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

<h3>What is a Goal Seek in Excel?</h3>

Microsoft Excel is known to have a goal seeking tool that is said to be built-in and it is one that gives room for the user to know the desired input value for any kind of  formula if the output value is said to be already known.

Hence, To set up scenarios, you need to first use Goal seek to set up a list, then data table  to set up the reference cell. Last you need to use  VLOOKUP to set up the cells that display the output results from the scenario.

See full question below

To set up scenarios, you need to first use to set up a list, then to set up the reference cell. Last you need to use to set up the cells that display the output results from the scenario. CHOOSE; VLOOKUP; data table Goal seek; data table; VLOOKUP Data validation; VLOOKUP; CHOOSE Data table; VLOOKUP;

Learn more about  VLOOKUP from

brainly.com/question/14042837

#SPJ1

6 0
1 year ago
Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Follow each number by a space.
Ksenya-84 [330]

Answer:

   while(userNum>=1){

       System.out.print(userNum/2+" ");

       userNum--;

        }

Explanation:

This is implemented in Java programming language. Below is a complete code which prompts a user for the number, receives and stores this number in the variable userNum.

<em>import java.util.Scanner;</em>

<em>public class TestClock {</em>

<em>    public static void main(String[] args) {</em>

<em>    Scanner in = new Scanner (System.in);</em>

<em>        System.out.println("Enter the number");</em>

<em>    int userNum = in.nextInt();</em>

<em>    while(userNum>=1){</em>

<em>        System.out.print(userNum/2+" ");</em>

<em>        userNum--;</em>

<em>         }</em>

<em>    }</em>

<em>}</em>

The condition for the while statement is userNum>=1 and after each iteration we subtract 1 from the value of   userNum until reaching 1 (Hence userNum>=1)

3 0
3 years ago
What does an SQL injection do
Afina-wow [57]

Answer:

SQL injection is a form of hacking that uses user input fields.

Explanation:

SQL injection is when a piece of code or entire algorithm is input where a program prompts for user input. They can be used to change or access data. To prevent this, a programmer should scrub inputs. Scrubbing data removes slashes and arrows, which or commonly used in code.

3 0
2 years ago
Read 2 more answers
A malware-infected networked host under the remote control of a hacker is commonly referred to as:
natali 33 [55]

Answer:

Option a: Trojan

Explanation:

A Trojan or Trojan horse is one of the computer malware that exist in computing world. Trojan often appears as a legitimate software to deceive user to activate it by social engineering. Once the Trojan is activated in the user computer, a hacker can remote control the infected computer for malicious purposes such as removing files, sending files, displaying message or rebooting computer.

However, Trojan cannot be replicated in the infected computer.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The first digital keyboard was the DX-7, introduced by the Yamaha company in 1983.
    15·1 answer
  • An increase in Consumption will ___________ in the Classical Model of Aggregate Demand.
    13·1 answer
  • Describe what is meant by the following:
    14·1 answer
  • What is an examlple of cyberbullying
    5·1 answer
  • Technician A says that the engine block is the solid frame from which all automotive and truck engines are constructed and is ma
    10·2 answers
  • 2. What type of expansion card allows your computer to
    12·1 answer
  • Which method do software testers use to isolate new code from the rest of the network during the test stage of the software deve
    15·1 answer
  • Advantages of Linux include_____.
    6·1 answer
  • Write a program code which asks for 80 numbers between 100 and 1000 to be entered.
    7·1 answer
  • An animation of a person standing with their arms extended out to their sides. There are 3 dimensional boxes around the torso of
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!