🔒 Closed Help Python

Status
Not open for further replies.

Phc-TheCoffeeToy

Established
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
  • 272
    Views
  • 2
    Participants
Last reply from:
zackmark29

Trending Topics

Online now

Members online
1,301
Guests online
2,384
Total visitors
3,685

Forum statistics

Threads
2,294,108
Posts
29,088,696
Members
1,208,080
Latest member
Zayn_0923
Back
Top