Question

Please answer using Python Pycharm programming.

y(t)vot gt for vo 10,9 9.81 3. Make a plot of the function and [O, 2vo/gl. Set the axes labels as time (s) and height (m). 4.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:

3.

import numpy as np
import matplotlib.pyplot as plt

vo = 10
g = 9.81

t = np.arange(0, 2*vo/g,0.1)

y = vo*t- (g*t*t)/2
plt.plot(t,y)
plt.xlabel('time(s)')
plt.ylabel('height(m)')

Output:

4.

import numpy as np


W = np.arange(0, 3.1,0.1)
print(W[:]) #print all elements of W
print(W[:-2]) # prints all elements except last 2
print(W[::5]) #print all elements at step size of 5
print(W[2:-2:6]) #prints from index 2 till length(W) - 2 with a step of 6

Output:

[0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.91. 1.1 1.21.3 1.4 1.51.6 1.7 1.8 1.9 2. 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3. ] [0. 0

Add a comment
Know the answer?
Add Answer to:
Y(t)vot gt for vo 10,9 9.81 3. Make a plot of the function and [O, 2vo/gl. Set the axes labels as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT