Пишем игры на Python, часть 2

Iqukethe izikhangisoUkuthenga ngaphakathi nohlelo
50K+
Okudawunilodiwe
Isilinganiselwa sokuqukethwe
I-PEGI engu-3
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini
Isithombe sesithombe-skrini

Mayelana nalolu hlelo lokusebenza

Izinhlelo zegeyimu, ukudala kusuka ekuqaleni: ezinganeni nasebusheni, kanye nabazali bazo kanye nothisha! Ingxenye yesibili. Idizayinelwe abafundi abahlukahlukene nabafundi bezinhlelo. Izibonelo ezisebenzisa iTkinter - Ukwakha iziphambano zanamuhla zewindows.

Iminyaka enconyiwe: kusuka eminyakeni eyi-13 nangemva kokufunda ingxenye yokuqala yento.

Imidlalo Yokubhala: Ukufunda uhlelo lwePython 3 ngokubhala imidlalo elula ekhombisa amakhono wokuhlela.

Kule ngxenye, okugcizelelwa kakhulu ukutadisha izakhiwo zedatha njengethuluzi lokucubungula imininingwane ngokuhlelekile. Izimpawu, izintambo, uhlu olulodwa nhlangothi-ntathu, ama-algorithms wokucubungula kwawo, ukubethela, ukuphindaphinda, ukuhlunga idatha. Ibhonasi: i-algorithm yohlobo olusheshayo ne-arithmetic ende.

Kungani lokhu kufundisa okuthile? Bengisebenza njengomfundisi wesayensi yamakhompiyutha cishe amashumi amabili eminyaka futhi ngithole into eyodwa ecasulayo. Iningi lezinto ezisetshenziselwe "ukufundisa izinhlelo" empeleni azifundisi, kepha ziwuhlobo lwesethenjwa olimini: syntax, functions, result. Vumelana, noma sifunda sonke isichazamazwi sesiRashiya nesiNgisi, ngeke sikhulume isiNgisi. Ngoba engxoxweni udinga ukwazi ubuqili obuyinkulungwane ngaphezulu: izinkathi, ukwehla, ukusetshenziswa kwezabizwana nezandiso, njalonjalo.

Kulesi sifundo, angikhulumi nje kuphela ngolimi lwe-Python 3, kepha futhi ngihola umfundi ekucabangeni, ekubonisaneni okunengqondo, engaphenduli umbuzo kuphela othi "Ngosizo luni?", Kodwa futhi nangokuthi "Ngani?" futhi kungani? " Yonke inkolelo-mbono izokhonjiswa ngokushesha ngokwenza.

UKWAKHIWA KWEZINTO:
- imininingwane eyisisekelo mayelana nezimpawu, izintambo, uhlu;
- ama-algorithms akhiwe kusetshenziswa ukuphindeka;
- izibalo ezinde;
- amaqhinga namasu wohlelo: awukwazi ukukopela isiphetho, kepha ungakwazi (futhi kufanele) wenze umsebenzi wakho ube lula;
- imidlalo: kunemidlalo emine kule ngxenye:

1. "Qagela igama" - umdlalo lapho umsebenzisi, ekhetha uhlamvu ngalunye ngesikhathi, ezama ukuqagela igama lesihloko esithile ngenombolo encane yemizamo.

2. "Ishumi nanhlanu" - iphazili kusuka ebuntwaneni bami baseSoviet, lapho kuneseli elilodwa kuphela lamahhala enkanjini ye-4x4. Kuyadingeka ngobuqili ukuhambisa amapuleti ngezinombolo kusuka ku-1 kuye ku-15 bese wenza ukulandelana okuthile. Ngendlela, le phazili ibilokhu iconsa iminyaka.

3. "Abahlaseli Besikhala" (c) (tm), njll. Umdlalo odumile nabafokazi abafikayo; sizoba nenguqulo elula ezosetshenziswa ngeTkinter. Ungenza okuthile okufanelekile ngokwakho. Okunye kokushicilelwa kubekwe endaweni yabahlaseli be-Space kuqala ohlwini lwabadubuli besikhala.

4. "Sokoban" - isilayishi simulator. Cabanga ngemigomo yokwakha imidlalo ye-labyrinth ngombono we-2D (ukubuka okuphezulu).

Ama-algorithm athulisiwe ahlose ukufundisa:
- ukuqonda izimiso zephrosesa;
- ikhono elisebenzayo lokudala nokubhala ama-algorithm ngolimi;
- ikhono lokuqalisa ukucubungula idatha ngamathuluzi wePython;
- ikhono lokusebenzisa amathuluzi olimi wanamuhla asezingeni eliphakeme;
- ... nokwandiswa kokuzijabulisa kokudala.

Uzothola:
- Ama-algorithm wokucubungula izakhiwo zedatha;
- izeluleko ezingokoqobo namazwana asuselwa eminyakeni eminingi yesipiliyoni;
- izigaba zokuklama ubuchule bemidlalo;
- incazelo yomsebenzi womtapo wolwazi waseTkinter onezibonelo ezingokoqobo;
- izivivinyo zokwenza ukuqonda kwekhodi yePython.

Ngiyacela, uma uluthandile uhlelo lokusebenza, sicela ulilinganise bese ubhala amazwana. Kukhuthaza kakhulu ukuqhubeka nokusebenza :)
Kubuyekezwe ngo-
Mey 8, 2024

Ukuphepha kwedatha

Ukuphepha kuqala ngokuqonda ukuthi onjiniyela baqoqa futhi babelane kanjani ngedatha yakho. Ubumfihlo bedatha nezinqubo zokuphepha zingahluka kuye ngokusebenzisa kwakho, isifunda, nobudala. Unjiniyela unikeze lolu lwazi futhi angalubuyekeza ngokuhamba kwesikhathi.
Le app ingabelana ngalezi zinhlobo zedatha nezinkampani ezingahlobene ngqo
Indawo, Ulwazi lomuntu siqu nabanye abangu-2
Ayikho idatha eqoqiwe
Funda kabanzi mayelana nokuthi onjiniyela bakuveza kanjani ukuqoqwa
Idatha ibetheliwe lapho ithunyelwa
Idatha ayikwazi ukusulwa

Yini entsha

- обновление библиотек для соответствия правилам Google.

Ukusekelwa kwe-app

Mayelana nonjiniyela
Виктор Трофимов
ОБЛ. РОСТОВСКАЯ, Г. ВОЛГОДОНСК, УЛ. 30 ЛЕТ ПОБЕДЫ, Д. 7, КВ. 10 ВОЛГОДОНСК Ростовская область Russia 347370
undefined

Okuningi ngo-Viktor Trofimov