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
vivado [14]
3 years ago
14

for my assignment 2: Room area assignment, I keep getting a negative number for room 2, and I don't know why I'm getting the wro

ng answer because i copied a girl that got 100.
Computers and Technology
1 answer:
ivann1987 [24]3 years ago
7 0

Answer:

The program in Python is as follows:

A = int(input("Side A: "))

B = int(input("Side B: "))

C = int(input("Side C: "))

D = int(input("Side D: "))

E = int(input("Side E: "))

A1 = A * B

A2 = (D - B - E)*(A - C)

A3 = 0.5 * E * (A - C)

Area = A1 + A2 + A3

print("Area:",Area)

Explanation:

One reason, you're getting a negative answer is that you probably entered a greater value for side C than A. Side A is meant to be greater than side C. Since the program do not need to be validated, you have to be careful with your inputs.

Another reason could be that your program is incorrect.

Get input for sides A to E

<em>A = int(input("Side A: "))</em>

<em>B = int(input("Side B: "))</em>

<em>C = int(input("Side C: "))</em>

<em>D = int(input("Side D: "))</em>

<em>E = int(input("Side E: "))</em>

Calculate rectangle area 1 (A1)

A1 = A * B

Calculate rectangle area 2 (A2)

A2 = (D - B - E)*(A - C)

Calculate the triangle area 3 (A3)

A3 = 0.5 * E * (A - C)

Calculate the total area

Area = A1 + A2 + A3

Print the calculated area

print("Area:",Area)

You might be interested in
Not all output display data for humans to read explain why​
Vadim26 [7]

Answer:

The eye has a very focused view that is optimised for perceiving movement.Human cannot see clearly outside an -5 degree cone of foveal vision.

8 0
3 years ago
Which of the following statement about device formatting is FALSE?
notsponge [240]

Answer:

The correct option is;

A) Device manufacturers store the initial file-system data structures in the device.

Explanation:

Before a storage device can be used for data storage, it is required to prepare the device for use and to make the device to become visible to the operating system by formatting of the device

New storage devices are not pre-formatted or come with a ready to use file system as there are different file systems specifically designed for particular  operating systems or operating environment.

Formatting creates partitions, makes the hard drive visible to the operating system and creates a file system that is new such that the storage device can be used for storing files.

4 0
3 years ago
What the repeal of online privacy protections means for you?
kvv77 [185]
Online Privacy is well, our privacy while on the internet. If they have repealed that, then we have no privacy while on the internet. I feel like now a days there is no privacy at all anywhere. Everywhere you go, there are cameras watching you. So for them to take away online privacy is pretty messed up.
7 0
4 years ago
Describe orderly how to save a Word document into a folder​
ivann1987 [24]
In order to do that you go onto the document you are going to save, on the top left it has the word “file”, click on that, once clicked it should say “Save as” and click on that, it will then ask you where you want it or which folder and you click the folder you want and finally click “save”
7 0
3 years ago
Write the definition of a method printarray, which has one parameter , an array of int s. the method does not return a value . t
stealth61 [152]
<span>void printArray(int a[ ]) {
</span> int i;   <span>for (i = 0; i &lt; a.length; i++){
</span>  <span>System.out.print(a[i]);
</span> System.out.println();   <span>}
</span> }
6 0
3 years ago
Other questions:
  • Consider the folloeing website URL:http://www.briannasblog.com. What does the "http://" represent?
    11·1 answer
  • Which VPN topology is also known as a hub-and-spoke configuration?
    15·1 answer
  • A computer has the following parameters Operation Frequency Cycles Arithmetic/Logical instructions 65% 1 Register load operation
    11·1 answer
  • Two processes are running the same program on a computer. The operating system can set up an access restriction on the control
    7·1 answer
  • JAVA Question!
    13·1 answer
  • URGENT: I need to add a while loop in this program but I don't know-how. I am also having trouble neatening some lines of code.
    15·1 answer
  • Join my among us code<br> SHUHZF
    6·2 answers
  • Edhesive 4.6 lesson practice <br><br> Range is an example of a_______.
    10·2 answers
  • How does the technology work
    10·2 answers
  • Location of a video or photoshoot is not important when it comes to preplanning the shoot
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!