[Student query] Why do we import libraries/modules such as Numpy and Matplotlib into Python?

When we are programming, there are often tasks that as humans we find relatively easy to do, for example, to draw a sine graph. We would simply draw the x and y axes and draw a period or two of the wave from our memory of what it looks like.To do this in a programming language such as Python is a lot more complicated, and requires manipulation of matrices and more complicated mathematical formulae to describe the sine wave.These libraries and modules give us pre-coded implementations of these common functions that are easier and more intuitive to use, allowing us to focus on the functionality of the program rather than having to tackle these low-level issues directly ourselves.

Answered by Jack R. Python tutor

1390 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Whats the output of "for i in "hello world": print(i)" and why/how is this achieved


Write a function with arguments r, dr that will return a 2D array of size (r/dr, r/dr). In the array "draw" two circles and assign them a value of 1. Separate the two circles by adding a nan circle of equal width.


Create a program that takes in two numbers and returns the highest of the two


[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy