A Jupyter Notebook contains two code cells. The first one reads 1 import numpy as np 2 import matplotlib.pyplot as plt and produces no output. The second code cell produces the following output: y position 1.0 0.8 0.6 0.4 0.2 0.0 Example 2 3 Select all of the following lines of code that can be found in the second code cell. (Note that they may not appear in the order in which they were executed.) ✔plt.show() O t = [-3 + k * 0.60 for k in range (11)] plt.plot(t, t, color='yellow", linestyle='dashdot', marker='v') plt.title('Example') plt.ylabel('y position') ✔ plt.plot(t, [1/_t if _t != 0 else np. nan for _t in t], color='black', linestyle='solid', marker='x') ✔ plt.plot(t, [1/(1+_t**2) for _t in t], color='red', linestyle='solid', marker='v') plt.ylim(0, 1) plt.ylim(-1, 1) Oplt.xlabel('t')

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 15E
icon
Related questions
Question
A Jupyter Notebook contains two code cells. The first one reads
1
import numpy as np
2 import matplotlib.pyplot as plt
and produces no output. The second code cell produces the following output:
y position
>
1.0
0.8-
> > >
0.6
0.4
0.2
0.0
Example
1
Select all of the following lines of code that can be found in the second code cell. (Note that they may not appear in the order in which they were executed.)
2
Ot= [-3 + k * 0.60 for k in range (11)]
plt.plot(t, t, color='yellow', linestyle='dashdot', marker='v')
plt.title('Example')
✔ plt.show()
✔plt.ylabel('y
position')
plt.plot(t, [1/_t if _t != 0 else np. nan for _t in t], color='black', linestyle='solid", marker='x')
✔ plt.plot(t, [1/(1+_t**2) for _t in t], color='red', linestyle='solid', marker='v')
plt.ylim (0, 1)
plt.ylim(-1, 1)
Oplt.xlabel('t')
Transcribed Image Text:A Jupyter Notebook contains two code cells. The first one reads 1 import numpy as np 2 import matplotlib.pyplot as plt and produces no output. The second code cell produces the following output: y position > 1.0 0.8- > > > 0.6 0.4 0.2 0.0 Example 1 Select all of the following lines of code that can be found in the second code cell. (Note that they may not appear in the order in which they were executed.) 2 Ot= [-3 + k * 0.60 for k in range (11)] plt.plot(t, t, color='yellow', linestyle='dashdot', marker='v') plt.title('Example') ✔ plt.show() ✔plt.ylabel('y position') plt.plot(t, [1/_t if _t != 0 else np. nan for _t in t], color='black', linestyle='solid", marker='x') ✔ plt.plot(t, [1/(1+_t**2) for _t in t], color='red', linestyle='solid', marker='v') plt.ylim (0, 1) plt.ylim(-1, 1) Oplt.xlabel('t')
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,