Education logo

Python course day 3

Libraries and modes

By Openee Article Published about a year ago 3 min read

Python has a vast number of libraries available for a wide range of purposes. Here are some of the most popular Python libraries:

NumPy - A library for working with arrays and matrices, used in scientific computing and data analysis.

Pandas - A library for working with data in tabular format, used for data manipulation, cleaning, and analysis.

Matplotlib - A library for creating data visualizations, including charts, plots, and graphs.

Scikit-learn - A library for machine learning algorithms, including regression, classification, and clustering.

TensorFlow - A library for building and training machine learning models, including neural networks.

Keras - A high-level neural networks library built on top of TensorFlow, used for rapid prototyping and development of machine learning models.

PyTorch - Another popular library for building machine learning models, particularly in deep learning.

Django - A web development framework for building web applications in Python.

Flask - A lightweight web framework for building small to medium-sized web applications in Python.

Requests - A library for making HTTP requests in Python, used for interacting with web APIs and other web-based services.

Beautiful Soup - A library for web scraping, used for extracting data from HTML and XML documents.

SQLAlchemy - A library for working with relational databases in Python.

These are just a few of the many libraries available for Python. The Python Package Index (PyPI) contains over 300,000 packages, including libraries and tools for everything from web development to scientific computing to game development.

Python is a popular programming language that can be used in two modes: interactive mode and scripting mode. Both modes have their own unique features and use cases.

Interactive Mode:

Interactive mode is a way to execute Python commands and statements directly in the command prompt. In this mode, you can enter Python commands and get immediate feedback on the results. Interactive mode is useful for quick testing and experimentation with Python code. It can also be used for teaching purposes, as students can see the results of their code immediately and get instant feedback.

To start the interactive mode, simply type python or python3 in your terminal, and press enter. You should see a Python prompt that looks like this:

Python 3.9.1 (default, Jan 8 2021, 23:05:25)

[GCC 10.2.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>>

>>> print("Hello, World!")

Hello, World!

Scripting Mode:

Scripting mode is a way to write and execute Python code from a file. In this mode, you write your Python code in a text editor or an Integrated Development Environment (IDE), save it as a file with a .py extension, and then execute the code using the command line.

Scripting mode is useful for writing larger programs and scripts that require more organization and structure than interactive mode. It also allows you to save your code and reuse it in the future.

To run a Python script from the command line, simply navigate to the directory where your script is saved and type python <filename>.py or python3 <filename>.py, depending on your system. For example, if you have a file named my_script.py in your current directory, you can run it by typing:

$ python my_script.py

In conclusion, both interactive mode and scripting mode are important tools for working with Python. Interactive mode is useful for quick testing and experimentation, while scripting mode is useful for writing larger programs and scripts that require more organization and structure. Understanding the differences between these two modes will help you choose the best approach for your particular task or project.

These two modes are used in Python to develop a code

vintagetraveltrade schoolteacherstudentstemproduct reviewpop culturemovie reviewlistinterviewhow tohigh schooldegreecoursescollegebullyingbook reviews

About the Creator

Openee Article

Openee Article . Specializing in writing artcile about Entertainers,Scientists,etc... we have a talent for making complex subjects accessible and engaging to a wide audience.

Enjoyed the story?
Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also pledge your support or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

    Openee Article Written by Openee Article

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.