Ungawuchaza njani umsebenzi kwiPython

NguJohn Paul Mueller

Ndingayithatha ibuprofen kunye ne-clindamycin

Ukwenza umsebenzi akudingi msebenzi ungako. IPython ikholisa ukwenza izinto ngokukhawuleza kwaye kube lula kuwe. La manyathelo alandelayo akubonisa inkqubo yokwenza umsebenzi onokufikelela kuwo kamva:



1Vula iwindow yePython Shell.

Uyabona iPython ekhawulezileyo.





Iipilisi ze-methocarbamol 750 mg

MbiniChwetheza u-Hello (): kwaye ucofe u-Enter.

Eli nyathelo lixelela iPython ukuba ichaze umsebenzi ogama linguMolo. Umzali ubalulekile kuba uchaza naziphi na iimfuno zokusebenzisa umsebenzi. Ikholoni ekugqibeleni ixelela iPython ukuba ugqibile ukuchaza indlela abantu abaya kufikelela ngayo emsebenzini. Qaphela ukuba isikhombisi sokufaka ngoku senziwe ngaphakathi. Oku kungeniswa sisikhumbuzo sokuba kufuneka unike umsebenzi umsebenzi wokwenza.





3 Chwetheza phrinta (Lo ngumsebenzi wam wokuqala wePython!) kwaye ucinezele Ngena.

Kuya kufuneka uqaphele izinto ezimbini. Kuqala, isikhombisi sokufaka sisalungiswa kuba i-IDLE ilinde wena ukuba ubonelele inyathelo elilandelayo ekusebenzeni. Okwesibini, iPython ayikhange iyenzeshicilela ()Umsebenzi kuba uyinxalenye yomsebenzi kwaye awukho kwinxalenye ephambili yefestile.



4Cinezela u-Enter.

Umsebenzi ngoku ugqityiwe. Ungatsho kuba indawo yokufaka ngoku ikwicala lasekhohlo. Ukongeza, i-Python Prompt (>>>) ibuyile.



Nokuba lo ngumsebenzi olula ngokwenene, ubonakalisa ipateni oyisebenzisayo xa usenza nawuphi na umsebenzi wePython. Ucacisa igama, unike naziphi na iimfuno zokusebenzisa umsebenzi (akukho kule meko), kwaye unike uthotho lwamanyathelo okusebenzisa umsebenzi. Umsebenzi uphela xa ukongezwa umgca ongezelelweyo (ucofa u-Enter kabini).

iziphumo ebezingalindelekanga ze-sam-e

Ukusebenza nemisebenzi kwi Hlela iwindow kuyafana nokusebenza nabo kwi-Python Shell window, ngaphandle kokuba ungagcina Hlela umxholo wewindows kwidiski.