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

Write a function is_rightangled which, given the length of three sides of a triangle, will determine whether the triangle is rig

ht-angled. Assume that the third argument to the function is always the longest side. It will return True if the triangle is right-angled, or False otherwise. Hint: floating point arithmetic is not always exactly accurate, so it is not safe to test floating point numbers for equality. If a good programmer wants to know whether x is equal or close enough to y, they would probably code it up as
Computers and Technology
1 answer:
Olenka [21]3 years ago
5 0

Answer:

Written in Python:

def is_rightangled(a,b,c):

     if abs(c**2 - (a**2 + b**2) < 0.001):

           return "True"

     else:

           return "False"

       

a = float(input("Side 1: "))

b = float(input("Side 2: "))

c = float(input("Side 3: "))

print(is_rightangled(a,b,c))

Explanation:

The function is defined here

def is_rightangled(a,b,c):

The following if statement implements Pythagoras theorem c^2 = a^2 + b^2 by checking if the left hand side is approximately equal to the right hand side

<em>      if abs(c**2 - (a**2 + b**2) < 0.001):</em>

<em>            return "True"</em>

<em>      else:</em>

<em>            return "False"</em>

If the specified condition is met, the if function returns true; Otherwise, it returns false.

The main function starts here

The next three line prompts user for the sides of the triangle

<em>a = float(input("Side 1: "))</em>

<em>b = float(input("Side 2: "))</em>

<em>c = float(input("Side 3: "))</em>

The next line calls the defined function

print(is_rightangled(a,b,c))

You might be interested in
An example of an unaltered material used to create objects is
ehidna [41]
<span>At mine site of Rijckholt in the Neatherlands, archaeologists ...

</span>
3 0
3 years ago
________ is the actual speed of data transfer that is achieved and is always less than or equal to the data transfer rate. quest
bogdanovich [222]
The correct answer is B. A throughput refers to how much a data can be transmitted from a certain amount of time from one location to another. It is also used to measure the function of hard drives and internet connections.
3 0
4 years ago
What is the different between the patch Tool and the Headling Brush tool?​
KonstantinChe [14]

Answer:

Explanation:

The Healing Brush and Patch tools add extra features. They match the texture, transparency, lighting, and shading of the sampled area. Instead of replacing them, pixel for pixel, like the clone stamp. This causes the painted pixels to blend seamlessly into the rest of the image. Using the Healing Brush tool: 1. Select the Healing Brush tool in the toolbox.

7 0
3 years ago
Allows a service provider organization to own and manage the infrastructure (including computing, networking, and storage device
djverab [1.8K]

Answer:

The answer is "Public Cloud computing".

Explanation:

It is a type of technology that focusing on domain-specific resources rather than using dedicated servers or intelligent machines. All services are provided as well as used throughout the Network and per user are paid, and certain options were wrong which can be described as follows:

  • In option 1, it is used to describe the details, it doesn't store data.
  • In option 2, It is used in the organization.
  • In option 3, It is used for courts or legal documentations.
7 0
4 years ago
How OS manages the reusable resources
katrin [286]

Answer:

Resources

A resource is anything required by a process.

Anything - os as resource manager.

Process - owns the resource.

Required - no resource, no progress; adaptive processes.

Resources - sharable, serially reusable, and consumable.

Explanation:

Resource durability determines how a resource reacts to being used. A reusable resource remains after being used. Disks, networks, CPUs are reusable resources.Oct 9, 201

4 0
3 years ago
Other questions:
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    12·1 answer
  • What is constructive criticism?
    5·1 answer
  • Varun wants to start his own business. Suggest him at least four functions of an entrepreneur.
    8·2 answers
  • A telephone repair technician uses a meter to measure voltage on a phone line. This meter is an example of _____.
    10·2 answers
  • A Programmer uses what piece of software?*
    12·1 answer
  • In a penetration test, a ________ team consists of IT staff who defend against the penetration testers. They are generally aware
    14·1 answer
  • How do you know when a spreadsheet object is active in a Word document?      A. The Ribbon is minimized. B. The Excel Formula ba
    10·2 answers
  • What is the ascii code for the letter D
    8·1 answer
  • How can blockchain be used to support sustainable business practices?
    8·1 answer
  • Daily IT Question
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!