๐Ÿ”’ 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
  • 261
    Views
  • 2
    Participants
Last reply from:
zackmark29

Online now

Members online
966
Guests online
1,995
Total visitors
2,961

Forum statistics

Threads
2,276,141
Posts
28,967,846
Members
1,231,131
Latest member
Yrrojan
Back
Top