Posts

Showing posts from July, 2022

Assignment-8

Image
Learn to handle files ,numpy and scipy  package :All university questions submit before 18th sep 10pm 1.Describe random number generation using Python 2.How can a generalized eigen value problem can be solved using Python? 3.   Write python program to solve the following system of equations (4)x1 − 2x2 + 9x3 + 13x 4 = 1 −5x1 + x2 + 6x3 − 7x4 = −3 4x1 + 8x2 − 4x3 − 2x4 = −2 8x1 + 5x2 − 7x3 + x 4 = 5 4.Explain how integration is performed with SciPy. Illustrate the same with the two sample integrals using SciPy function 5.Describe various modes of opening a file ? Explain any two in detail  6.Generate a 1-D array of 10 random integers. Each integer should be a number between 30 and 40 (inclusive) 7. Write a python program to convert a list of numeric values into a one-dimensional NumPy array. 8.Illustrate how numpy arrays are created with examples. How indexing, arithmetic operations and slicing is done with examples. 9.What are the two types of files? Explain different fi...

Plotting- Simple plots,setting limits,subplot, semilog, loglog plots

Image
data—plotting—is one of the most important tools for evaluating and understanding scientific data and theoretical predictions. Plotting is not a part of core Python, however,but is provided through one of several possible library modules. The most highly developed and widely used plotting package for Python is matplotlib ( http://matplotlib.sourceforge.net/ ). It is a powerful and flexible program that has become the defacto standard for 2D plotting with Python. Because matplotlib is an external library—in fact it’s a collection of libraries—it must be imported into any routine that uses it. matplotlib makes extensive use of NumPy so the two should be imported together. Therefore, for any program that is to produce 2D plots, you should include the lines import numpy as np import matplotlib.pyplot as plt plot function.   It is used to plot x-y data sets and is written like this plot(x, y) where x and y are arrays (or lists) that have the same size. If the x array is omitted, that...