Python_day1

Background:

I am totally a layman of python. Of course I know it is a programming language and it is popular. There are millions and millions people who can use python in the world but for me. I have to learn it immediately because I have no time to wait and to waste.

Beginning

Today I downloaded the Python_3.8 and installed it. This task is easy.
I followed the instruction from Liaoxuefeng https://www.liaoxuefeng.com/wiki/1016959663602400 and read a python book named Snake Wrangling for Kids. I suppose I am a kid too in this filed.

image.png

I guess the 2nd file Python 3.8(64-bit) is the python interpreter. that is where we write the Python code and run it.

An interpreter is a program that converts the code a developer writes into an intermediate language, called the byte code. It converts the code line by line, one at a time. It translates till the end and stops at that line where an error occurs, if any, making the debugging process easy.

Well, my python interpreter is a CPython interpreter.
The following paragraph describes how a Python interpreter works. I can't understand it completely now but one day I will.

What happens when you run a Python Code?
On running a Python code, say a simple program that prints “Hello, World!”, then the following steps happen:

  1. The program gets converted into an intermediate code, called bytecode. This is also binary but is not understood by the processor.
  2. Python Interpreter, stored in the memory as a collection of instructions in binary form, does the above conversion. These instructions can be thought of as a combination of a compiler and a Python Virtual Machine (PVM).
  3. The compiler converts the source code, the “Hello, World!” program, into the byte code, which is platform-independent and understood by the PVM.
  4. PVM reads the byte code and executes it on the hardware, the job of a processor.

Interactive mode is a command line shell which gives immediate feedback for each statement, while running previously fed statements in active memory. As new lines are fed into the interpreter, the fed program is evaluated both in part and in whole. Interactive mode is a good way to play around and try variations on syntax.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末盗舰,一起剝皮案震驚了整個濱河市奋早,隨后出現(xiàn)的幾起案子恃慧,更是在濱河造成了極大的恐慌,老刑警劉巖螟炫,帶你破解...
    沈念sama閱讀 221,198評論 6 514
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異肴甸,居然都是意外死亡相嵌,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,334評論 3 398
  • 文/潘曉璐 我一進(jìn)店門承桥,熙熙樓的掌柜王于貴愁眉苦臉地迎上來驻粟,“玉大人,你說我怎么就攤上這事凶异∈癯牛” “怎么了?”我有些...
    開封第一講書人閱讀 167,643評論 0 360
  • 文/不壞的土叔 我叫張陵剩彬,是天一觀的道長酷麦。 經(jīng)常有香客問我,道長喉恋,這世上最難降的妖魔是什么沃饶? 我笑而不...
    開封第一講書人閱讀 59,495評論 1 296
  • 正文 為了忘掉前任母廷,我火速辦了婚禮,結(jié)果婚禮上糊肤,老公的妹妹穿的比我還像新娘琴昆。我一直安慰自己,他們只是感情好轩褐,可當(dāng)我...
    茶點故事閱讀 68,502評論 6 397
  • 文/花漫 我一把揭開白布椎咧。 她就那樣靜靜地躺著,像睡著了一般把介。 火紅的嫁衣襯著肌膚如雪勤讽。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,156評論 1 308
  • 那天拗踢,我揣著相機與錄音脚牍,去河邊找鬼。 笑死巢墅,一個胖子當(dāng)著我的面吹牛诸狭,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播君纫,決...
    沈念sama閱讀 40,743評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼驯遇,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了蓄髓?” 一聲冷哼從身側(cè)響起叉庐,我...
    開封第一講書人閱讀 39,659評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎会喝,沒想到半個月后陡叠,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,200評論 1 319
  • 正文 獨居荒郊野嶺守林人離奇死亡肢执,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,282評論 3 340
  • 正文 我和宋清朗相戀三年枉阵,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片预茄。...
    茶點故事閱讀 40,424評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡兴溜,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出耻陕,到底是詐尸還是另有隱情昵慌,我是刑警寧澤,帶...
    沈念sama閱讀 36,107評論 5 349
  • 正文 年R本政府宣布淮蜈,位于F島的核電站,受9級特大地震影響已卷,放射性物質(zhì)發(fā)生泄漏梧田。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,789評論 3 333
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望裁眯。 院中可真熱鬧鹉梨,春花似錦、人聲如沸穿稳。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,264評論 0 23
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽逢艘。三九已至旦袋,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間它改,已是汗流浹背疤孕。 一陣腳步聲響...
    開封第一講書人閱讀 33,390評論 1 271
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留央拖,地道東北人祭阀。 一個月前我還...
    沈念sama閱讀 48,798評論 3 376
  • 正文 我出身青樓,卻偏偏與公主長得像鲜戒,于是被迫代替她去往敵國和親专控。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 45,435評論 2 359

推薦閱讀更多精彩內(nèi)容