Python issues cont.

Status
Not open for further replies.

cameraguy

Beta member
Messages
2
hey guys! thanks for all your help. I am really new to all this stuff.:big_grin: Anyway, I am writing a simple program to calculate the optimum takeoff speed of a jump.
The problem is that it keeps telling me that "builtin_function_or_method object unsubscriptable" please help!
Here it is:

takeoff_angle = float(raw_input())
landing_distance = float(raw_input())
import math
takeoff_speed = math.sqrt[16.1*(landing_distance)/math.cos(math.pi * takeoff_angle / 180)] * 3600 / 5280
print takeoff_speed
 
Hi!
You need to use round brackets when calling a function - in this case math.sqrt.
The correct version would be:
takeoff_speed = math.sqrt(16.1*(landing_distance)/math.cos(math.pi * takeoff_angle / 180)) * 3600 / 5280
 
Status
Not open for further replies.
Back
Top Bottom