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
The rhythmic note that three beats is called a____half note.
aev [14]

Answer:

it is called a dotted half note

7 0
3 years ago
Read 2 more answers
Video- sharing sites allow videos to be uploaded in which file format?
ziro4ka [17]

Question

video- sharing sites allow videos to be uploaded in which file format?

the correct answer is .avi?


Yes it is .avi, because the other extension are not video.


8 0
3 years ago
Read 2 more answers
The method "someOtherMethod" is NOT defined as static. This means...
Verdich [7]

Answer:

3

Explanation:

7 0
3 years ago
Write code which takes inputs and creates two Rectangle objects (using the edhesive.shapes.Rectangle class) and compares them us
iogann1982 [59]

Answer:

System.out.println("Enter length:");

Scanner scan = new Scanner(System.in);

Double x = scan.nextDouble();

System.out.println("Enter 2 lengths:");

Double a = scan.nextDouble();

Double b = scan.nextDouble();

Rectangle rect = new Rectangle(x);

Rectangle rect2 = new Rectangle (a,b);

if (rect2.equals(rect)){

 System.out.print("Congruent Rectangles");

}

else {

 System.out.print("Different Rectangles");

}

 }

}

Explanation:

6 0
3 years ago
Gold jewellery is made when solid-gold is melted and then put into containers which are the shape of the jewellery. After this t
Scilla [17]

Answer:

B

Explanation:

Self Explanatory - It is melted into a liquid then poured into a mold. It cools and becomes solid.

5 0
3 years ago
Other questions:
  • Risa has a negative credit rating, and she feels obtaining a fresh loan credit is going to be quite difficult for her. Her frien
    15·1 answer
  • Trish has bought a new computer that she plans to start working on after a week. Since Trish has not used computers in the past,
    10·1 answer
  • How can you print a mailing label in word
    13·1 answer
  • Kash has created a document that needs to be protected. only certain users should be able to open the document. what option shou
    5·1 answer
  • Considering the concept of salted passwords, answer the following questions: a. Bob thinks that generating and storing a random
    10·1 answer
  • The Nigerian 4-6-9 scam refers to a fraudulent activity whereby individuals claiming to be from a foreign country will promise a
    11·1 answer
  • Breaking code rules is only a problem once in a while. Group of answer choices True False
    12·1 answer
  • Select the correct answer.
    7·1 answer
  • What are the types of micro computer?​
    14·2 answers
  • What is an example of content?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!