MD1 Python environments Flashcards
Python environments
You can run Python through a variety of environments. These environments include notebooks, integrated development environments (IDEs), and the command line. This reading will introduce you to these environments. It will focus primarily on notebooks because this is how you’ll interact with Python in this course.
Notebooks
One way to write Python code is through a notebook. In this course, you’ll interact with Python through notebooks. A notebook is an online interface for writing, storing, and running code. They also allow you to document information about the code. Notebook content either appears in a code cell or markdown cell.
Code cells
Code cells are meant for writing and running code. A notebook provides a mechanism for running these code cells. Often, this is a play button located within the cell. When you run the code, its output appears after the code.
Markdown cells
Markdown cells are meant for describing the code. They allow you to format text in the markdown language. Markdown language is used for formatting plain text in text editors and code editors. For example, you might indicate that text should be in a certain header style.
Common notebook environments
Two common notebook environments are
Jupyter Notebook
and
Google Colaboratory
(or Google Colab). They allow you to run several programming languages, including Python.
https://jupyter.org/about
https://colab.research.google.com
Integrated development environments (IDEs)
Another option for writing Python code is through an integrated development environment (IDE), or a software application for writing code that provides editing assistance and error correction tools. Integrated development environments include a graphical user interface (GUI) that provides programmers with a variety of options to customize and build their programs.
Command line
The command line is another environment that allows you to run Python programs. Previously, you learned that a command-line interface (CLI) is a text-based user interface that uses commands to interact with the computer. By entering commands into the command line, you can access all files and directories saved on your hard drive, including files containing Python code you want to run. You can also use the command line to open a file editor and create a new Python file.
Key takeaways
Security analysts can access Python through a variety of environments, including notebooks, integrated development environments, and the command line. In this course, you’ll use notebooks, which are online interfaces for interacting with code. Notebooks contain code cells for writing and running code as well as markdown cells for plain text descriptions.
next was an exemplar see course 7 MD1 exemplar python examples.