1.1 Palatable Python_Introduce

mseokq23·2024년 12월 27일

Palatable Python

목록 보기
1/11

1.1 Introduce Python

small talk

Python is an interpreter language developed by Amsterdam's Guido van Rossum in 1990.
It is said that Guido got the name from his favorite comedy show, Monty Python's Flying Circus.

Python's dictionary meaning means "a large snake that lived in the caves of Mount Parnassus in ancient mythology," and it is said that Apollo God eradicated Python in Delphi. This is why most Python book covers and icons are drawn in the shape of snakes.

Python is a programming language with concise grammar and versatility.

It features a rich library, interpreter method, and cross-platform support, and supports Object-Oriented Programming(OOP) and Dynamic typing.

It is used in a variety of fields from web development to data analysis and AI, and is widely used as it is easy for beginners to learn.

There are many ways to use python
ex.
1) basic Python
2) Python Anconda
3) Jupyter Notebook
4) Google Colab

1.1.1 Why we use Python

1.1.1.1 Python's Features: Interpreter

Python is a high-level interpreter language that interprets the source code line by line. (+Run line by line immediately)

This increases readability and productivity, and enables fast prototyping.

It is relatively slow to execute, but it is easy to modify code and provides platform independence.

1.1.1.2 Execution processs

Python's execution process:

1.Create Source Code:

Developers write Python code in a .py file.

2. Python interpreter:

Python interpreter prepares to run this code. In this process, Python code is read and executed line by line.

3.Byte Code Generation:

-Python code is compiled as a byte code, which is an intermediate representation of Python, a form that can be executed in a Python virtual machine (PVM).

Although this process can be considered compilation, it differs from compilation in the general sense (transformation into machine language).

-Byte code is stored as a .pyc file, which is then available faster when the same code is executed.

4. Run:

The interpreter executes this byte code, where the byte code is executed line by line in the Python virtual machine.

1.1.1.2 Python's Features: Grammar

Python Indentation

In Python, indentation is a key defining element of code structure, used instead of braces to enhance readability.

Since incorrect indentation causes SyntaxError, consistency is important.

Four spaces are usually recommended.

And thanks to these characteristics, Python is beginner-friendly and easy to understand when collaborating.

1.1.1.3 Python's Features: Fast development

This would be the most efficient sentence to represent Python

"Life is too short, You need python."


1.1.2 Basic Python => move to 1.2 script

Launch IDLE (Python 3.13 64-bit)

text this

import this

0개의 댓글