import math def main(): """ Application of vector analysis to mechanics """ a = float(input("please enter the acceleration of the object: ")) v = float(input("please enter the initial velocity of the moving object: ")) theta = float(input("please enter the initial angle of the moving object: ")) h = float(input("please enter the initial height of the object: ")) t = float(input("please enter the number of seconds that the object has been moving for: ")) """ The X and Y components of the Force Vector """ X = v*t*math.cos(theta) Y = h + v*t*math.sin(theta) - a*t**2 F = X, Y print F main()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question