Skip to content

DawnSaju/Challenge-3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Challenge-3

CodeBeans 1.0 - Challenge 3

  • Importing Required Package.
import math
  • Defining the function with 4 paramters.
def Function_1(x1, y1, x2, y2):
    return math.sqrt((x1-x2)**2 + (y1-y2)**2)
  • Defining the Pillar_Coordinates function with 6 paramters, creating 3 variable named a,b and c and assigning the First function with 4 parameters Finally creating a varibale named as x and assigning (a + b + c) divided by 2 and returning it.
def Pillar_Coordinates(x1, y1, x2, y2, x3, y3):
    a = Function_1(x1, y1, x2, y2)
    b = Function_1(x1, y1, x3, y3)
    c = Function_1(x2, y2, x3, y3)
    x = (a + b + c) / 2
    return math.sqrt(x * (x - a) * (x - b) * (x - c))
  • Declaring the Variables.
x1, y1 = map(float, input().split())
x2, y2 = map(float, input().split())
x3, y3 = map(float, input().split())
  • Final Output.
print("\nOutput: ")
print(Pillar_Coordinates(x1, y1, x2, y2, x3, y3))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages