Cov txheej txheem:

Python Nyob Zoo Ntiaj Teb!: 8 Cov Kauj Ruam
Python Nyob Zoo Ntiaj Teb!: 8 Cov Kauj Ruam

Video: Python Nyob Zoo Ntiaj Teb!: 8 Cov Kauj Ruam

Video: Python Nyob Zoo Ntiaj Teb!: 8 Cov Kauj Ruam
Video: Tik Tok || Tseem Nco Koj Thiab Kuv P15 2024, Kaum ib hlis
Anonim
Python Nyob Zoo Ntiaj Teb!
Python Nyob Zoo Ntiaj Teb!

Nov yog cov lus qhia ib kauj ruam ntawm kev tsim cov kev pab cuam Python yooj yim siv PyCharm Community Edition.

Kauj ruam 1: Rub tawm PyCharm Community Edition

Rub tawm PyCharm Community Edition
Rub tawm PyCharm Community Edition

PyCharm tuaj yeem rub tawm los ntawm JetBrains lub vev xaib dawb ntawm qhov txuas hauv qab no:

www.jetbrains.com/pycharm/download/#sectio…

Txhawm rau rub tawm PyCharm Community Edition, Cias nyem rau ntawm lub pob dub download.

Kauj Ruam 2: Nrhiav Cov Ntaub Ntawv Txhim Kho

Nrhiav cov ntaub ntawv teeb tsa
Nrhiav cov ntaub ntawv teeb tsa

Thaum PyCharm ua tiav rub tawm, koj yuav tsum muaj peev xwm pom cov ntawv teeb tsa hauv koj li ntawv rub tawm.

Ob npaug nias rau ntawm PyCharm cov ntaub ntawv teeb tsa.

Kauj Ruam 3: Kev Txhim Kho

Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa
Kev teeb tsa

Thaum qhov kev teeb tsa tau qhib koj yuav raug nthuav tawm nrog PyCharm Community Edition Setup window.

Thawj lub vijtsam nthuav tawm cov lus qhia.

Nyem Tom ntej no.

Lub vijtsam thib ob yog siv los xaiv qhov chaw teeb tsa. Qhov no muaj txiaj ntsig yog tias koj lub khoos phis tawj muaj chaw seem tsawg.

Xaiv qhov koj xav kom PyCharm raug teeb tsa thiab nyem Next.

Lub vijtsam thib peb nthuav qhia cov kev xaiv luv thiab muab qhov kev xaiv los koom ua ke.py cov ntaub ntawv nrog PyCharm program.

Qhov no txhais tau tias yog cov ntaub ntawv nrog qhov txuas ntxiv.py tau qhib hauv koj lub khoos phis tawj, nws yuav sim qhib cov ntawv siv PyCharm.

Nyem Tom ntej no.

Lub vijtsam plaub yog siv los tsim Cov Ntawv Qhia Ntawv rau PyCharm.

Nyem Tom ntej no.

Qhov tshuaj ntsuam thib tsib yuav lees paub tias PyCharm tau ua tiav tiav.

Khij lub npov tom ntej no "Khiav PyCharm Community Edition"

Ces Nyem Ntxiv.

Kauj ruam 4: Pib Teeb

Pib Teeb
Pib Teeb
Pib Teeb
Pib Teeb

Thaum PyCharm tau qhib thawj zaug, lub qhov rai teeb tsa thawj zaug yuav nthuav tawm.

Lub qhov rai no tso cai rau tus neeg siv hloov qee yam kev zoo nkauj ntawm PyCharm program.

Nyem OK.

Qhov pib teeb tsa lub qhov rai yuav ploj mus thiab koj yuav pom Qhov Zoo Siab Txais Tos.

Nyem rau ntawm "Tsim Txoj Haujlwm Tshiab" txhawm rau pib tsim koj txoj haujlwm.

Kauj Ruam 5: Tsim Txoj Haujlwm

Tsim Txoj Haujlwm
Tsim Txoj Haujlwm
Tsim Txoj Haujlwm
Tsim Txoj Haujlwm

Tam sim no koj yuav raug nthuav tawm nrog Qhov Tshiab Project qhov rai.

Qhov chaw nyob tsis raug yuav suav nrog "tsis muaj npe" thaum kawg.

Qhov chaw no tuaj yeem hloov pauv mus rau yuav luag txhua yam koj xav tau tab sis peb yuav hloov nws mus rau "myfirstprogram".

Nyem Tsim.

Kauj Ruam 6: Tsim Python File

Tsim Cov Ntaub Ntawv Python
Tsim Cov Ntaub Ntawv Python
Tsim Cov Ntaub Ntawv Python
Tsim Cov Ntaub Ntawv Python
Tsim Cov Ntaub Ntawv Python
Tsim Cov Ntaub Ntawv Python

PyCharm thiab lwm yam IDEs (Kev Txhim Kho Kev Txhim Kho Ib puag ncig) feem ntau qhib nrog lub "Ntsis ntawm hnub" qhov rai. Cov no muaj txiaj ntsig ntau rau cov kws tsim txuj ci dhau los, feem ntau yog cov lus qhia hais txog kev luv uas ua kom nrawm dua cov txheej txheem txheej txheem.

Mus tom ntej thiab kaw qhov "Ntsis ntawm hnub" qhov rai.

Txhawm rau tsim peb cov ntaub ntawv nab hab sej qhov peb xav tau, peb nyem rau ntawm myfirstprogram nplaub tshev, yuj dua tshiab, tom qab ntawd xaiv cov ntaub ntawv sej.

Qhov no yuav qhib qhov "New Python File" window uas koj tuaj yeem sau npe cov ntawv.

Cia peb sau nws "HelloWorld" thiab xaiv OK.

Kauj Ruam 7: Code Koj Txoj Haujlwm

Code Koj Txoj Haujlwm
Code Koj Txoj Haujlwm

Nab hab sej yog cov lus programming muaj zog heev uas tso cai rau tus programmer ua tiav ntau yam siv cov lej me me.

Rau peb txoj haujlwm yooj yim peb tsuas xav tau ib kab ntawm cov lej:

print ("Nyob zoo, Ntiaj Teb!")

Ntaus qhov no rau hauv HelloWorld.py thiab peb yuav npaj los khiav peb txoj haujlwm.

Kauj Ruam 8: Khiav Koj Txoj Haujlwm

Khiav Koj Txoj Haujlwm
Khiav Koj Txoj Haujlwm
Khiav Koj Txoj Haujlwm
Khiav Koj Txoj Haujlwm
Khiav Koj Txoj Haujlwm
Khiav Koj Txoj Haujlwm

Nyem Khiav nyob rau sab saud ntawm qhov screen.

Nyem Khiav ntawm cov ntawv qhia zaub mov nco.

Nyem HelloWorld ntawm lub Qhov rai uas tshwm.

Tam sim no koj qhov program yuav ua haujlwm hauv qab ntawm qhov screen.

CONGRATULATIONS! Koj tau ua tiav koj thawj txoj haujlwm Python!

Pom zoo: