🔒 Closed Help Python

Status
Not open for further replies.

Phc-TheCoffeeToy

Eternal Poster
This is the problem sir but ayaw mag run ng na compile ko. Patulong naman sa marurunong need ko talaga

The program will ask for a parabolas vertex and focus point. it then returns the diretrix, the length and endpoints of the latus rectum, axis of symmetry, and if it opens upward or downward.

ito yung code ko

a=float(input("Enter distance from center to vertex"))
b=float(input("Enter distance from center to co-vertex"))
c=float(input("Enter distance from center to focus"))

def parabola('a', 'b', 'c'):
print ("Vertex: (" , (-b / (2 * a)) , ", "
,(((4 * a * c) - (b * b)) / (4 * a)) , ")" )

print ("Directrix: y="
, (int)(c - ((b * b) + 1) * 4 * a ))

parabola(a, b, c)

elif parabola in ['x=2, 'y=4']:
print ("Axis of Symmetry")
elif parabola in ['upward', 'downward']:
print ("Opening")
print ("END PROGRAM")
 
Python:
def parabola(a, b, c):
    print("Vertex: (" , (-b / (2 * a)) , ", ",(((4 * a * c) - (b * b)) / (4 * a)) , ")")
    print("Directrix: y=", (int)(c - ((b * b) + 1) * 4 * a ))

a=float(input("Enter distance from center to vertex "))
b=float(input("Enter distance from center to co-vertex "))
c=float(input("Enter distance from center to focus "))

parabola(a, b, c)
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 287
    Views
  • 2
    Participants
Last reply from:
zackmark29

Trending Topics

Online now

Members online
362
Guests online
3,424
Total visitors
3,786

Forum statistics

Threads
2,331,971
Posts
29,261,465
Members
1,147,943
Latest member
Jrob30
Back
Top