05-Python

Python(Part.2)|python development environment and execution

Learning python without thinking too hard| table of contentsThis is a table of contents page for Python....

Objectives

Understand IDLE.
Be able to run python in interactive mode.

Python development environment

Python development environment

Python development environment

When writing a programme and developing a system, various mechanisms are required, including “a mechanism for writing the programming language”, “a mechanism for running the programme”, “a mechanism for checking the cause of errors” and “a mechanism for finding unintended movements (bugs) in the running programme”. In python as well, these mechanisms are required.

In python, tools (integrated development environment) such as Jupyter and pyCharm are available as a mechanism to do these things. In this article (Python (Part 2) | Python Development Environment and Execution), I will try to input and execute simple python using the integrated development environment called ‘IDLE’, which is included when ‘python’ is installed.

“IDE”: Abbreviation for ‘Integrated Development Environment’, a tool (software) that provides the necessary framework for development.

How to start up an IDLE

Click on the Windows Start menu.

Click on ‘All apps’.

Click on the installed ‘python’ directory to expand it. After expansion, click on the ‘IDLE’ that appears.

The ‘IDLE’ is activated.

interactive mode

As mentioned in the previous article on ‘interactive mode’, it refers to a mode in which python is executed as if it were a line-by-line dialogue using an ‘interactive shell (python console)’.

Running python using interactive mode

Once IDLE has been started, run the following program to find the area of a triangle.

Enter ’10’ in the variable ‘height’ and ’10’ in the variable ‘bottom’ and divide the result by 2. (Explanation of variables etc. is given in another issue).

Continue after the symbol >>> and enter “height = 10″.

Continue by entering “bottom = 10” after the new >>>.

Continue by entering “(hegiht * bottom) / 2” after the >> >.

After the last calculation ((hegiht * bottom) / 2), the execution result appears as “50.0” without the “>>>” and the “>>>” appears again on the next line.

Previously, the ‘Interactive Shell’ was started from the ‘Command Prompt’. This time, a similar mode of execution was performed from IDLE.

That’s all for this time.

「python」おすすめ書籍 ベスト3 | 現役エンジニア&プログラミングスクール講師「python」の学習でお勧めしたい書籍をご紹介しています。お勧めする理由としては、考え方、イメージなどを適切に捉えていること、「生のpython」に焦点をあてて解説をしている書籍であることなどが理由です。勿論、この他にも良い書籍はありますが、特に質の高かったものを選んで記事にしています。ページの下部には「おすすめのITスクール情報」「おすすめ求人サイト」について情報を掲載中。...

ブックマークのすすめ

「ほわほわぶろぐ」を常に検索するのが面倒だという方はブックマークをお勧めします。ブックマークの設定は別記事にて掲載しています。

「お気に入り」の登録・削除方法【Google Chrome / Microsoft Edge】「お気に入り」の登録・削除方法【Google Chrome / Microsoft Edge】について解説している記事です。削除方法も掲載しています。...
【パソコン選び】失敗しないための重要ポイント | 現役エンジニア&プログラミングスクール講師【パソコン選び】失敗しないための重要ポイントについての記事です。パソコンのタイプと購入時に検討すべき点・家電量販店で見かけるCPUの見方・購入者が必要とするメモリ容量・HDDとSSDについて・ディスプレイの種類・バッテリーの持ち時間や保証・Officeソフト・ウィルス対策ソフトについて書いています。...
RELATED POST
05-Python

Python(Part.25)| python【反復構造(二重for文)】| [Iterative Structures (double for statement)]

2024年7月4日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site