Hi, I am having trouble with using the matplotlib function in
python. A tutorial in this question and a lesson on how to use it
would be great. Thanks so much.![2- Write a program using matplotlib that gives the following output Consider 100 points between [0,10] Fiqure 1 10 8 10 #Your](http://img.homeworklib.com/questions/b74a15a0-2ad2-11eb-a2e5-95cf2808002e.png?x-oss-process=image/resize,w_560)
`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
import numpy as np
import matplotlib.pyplot as plt
x=np.linspace(0,10,100) #to get the x axis values.
y=np.sin(x) #to get the amplitude
y1=np.sin(2*x) #to get the amplitude
y2=np.sin(3*x) #to get the amplitude
plt.subplot(3,1,1)
plt.plot(x,y)
plt.subplot(3,1,2)
plt.plot(x,y1)
plt.subplot(3,1,3)
plt.plot(x,y2)
plt.show()
Kindly revert for any queries
Thanks.
Hi, I am having trouble with using the matplotlib function in python. A tutorial in this...
I'm having trouble with the following Python homework assignment question in ZyBooks: 2.14 HW: Driving costs Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 50 miles, and 400 miles. Ex: If the input is: 20.0 3.1599 Then the output is: 1.579950 7.899750 63.198000 Any assistance is greatly appreciated. Thanks!
I am new to Python and
am having trouble coming up with writing code to the following
problem...
The program must:
Prompt for a file name
Opens that file and reads through the file
Displays a custom error message if the file does not exist
You can pull the hour out from the 'From ' line by finding the
time and then splitting the string a second time using a
colon.
From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008
Accumulated the...
Hi, so I am given a situation, and I am supposed to answer this two part question. So here is the situation Two Carts, going towards each other to a collision (ELASTIC COLLISION) Car 1 information m1= unknown (mass of car) initial velocity: 30 cm/s (no need to convert to m/s) final velocity: 0 Car 2 information: m2 = 150g initial velocity: -30 cm/s (negative because it is a vector, going towards the left) final velocity: unknown First part asks...
Hi, so I am given a situation, and I am supposed to answer this two part question. So here is the situation Two Carts, going towards each other to a collision (ELASTIC COLLISION) Car 1 information m1= unknown (mass of car) initial velocity: 30 cm/s (no need to convert to m/s) final velocity: 0 Car 2 information: m2 = 150g initial velocity: -30 cm/s (negative because it is a vector, going towards the left) final velocity: unknown First part asks...
HI, I am having trouble with this question. Its in The Basics of Practice of Statistics 8th edition by Moore, chapter 12 question 22. You read in a book on poker that the probability of being dealt a straight flush in a five-card poker hand is 1/64,974. This means that... a) if you deal millions of poker hands, the fraction of them that contain a straight flush will be very close to 1/64,974 b) if you deal 64,974 poker hands,...
I am having trouble with these three problems that are in the
attached document, thank you for your help.
9. Using your calculator, find the csc(-200).
10. Solve the following right triangle (see image.)
11. Find a trigonometric equation for the following graph (see
image.)
Thanks !!
Images:
Hi, I am having trouble with the following question: Given an unsorted array with integers, find the median of it using the Quick Select method we’ve discussed in the class (Hint: We use the quick select to find the kth smallest element in an unsorted array in O(n) time complexity). Note: A median is the middle number of the array after it is sorted. And in this problem, we return the N/2-th number after sorted if there are even numbers...
Hi, I am writing Java code and I am having a trouble working it out. The instructions can be found below, and the code. Thanks. Instructions Here are the methods needed for CIS425_Student: Constructor: public CIS425_Student( String id, String name, int num_exams ) Create an int array exams[num_exams] which will hold all exam grades for a student Save num_exams for later error checking public boolean addGrade( int exam, int grade ) Save a grade in the exams[ ] array at...
Hi,
I'm having trouble solving this problem... Could you please
solve it using clear detailed steps so that I can
better understand how to tackle it next time?
Thanks! :)
Consider the following image. (Take q1 +2.95 nC and q28.44 nC.) gh 42 (a) Find the net electric flux through the cube shown in the figure above. N m2/c (b) Can you use Gauss's law to find the electric field on the surface of this cube? Yes No Explain
This is python code I am having trouble with the both winning messages printing if the user guesses in 1 try. 1 message or the other should print depending on the number of guesses not both. Thank you for your help! import random answer = 5 tries = 0 user_guess = "" while True: user_guess = int(input("enter a number between 1 and 10: ")) tries = tries + 1 if user_guess == answer: print ("You win! \nIt took you",...