Cov txheej txheem:
- Kauj Ruam 1: Tua Koj Tus Python Coding App
- Kauj ruam 2: Ntshuam Random Class
- Kauj Ruam 3: Txheeb cais Txoj Kev Python Nrog Kev Hloov Tawm N
- Kauj Ruam 4: Pib Pib Boolean Variable thiab Integer Variable
- Kauj Ruam 5: Pib 'rau' Loop rau Range N
- Kauj Ruam 6: Pib Ob Qhov Random Integer Values Ntawm 1 thiab 10 thiab Teem Boolean Tus Nqi rau Qhov Tseeb
- Kauj Ruam 7: Pib 'thaum' Loop Thaum Boolean Variable Yog Qhov Tseeb
- Kauj Ruam 8: Luam ib qho Ntxiv Qhov Teeb Meem Nrog Tus Nqi 1 thiab 2 thiab Teb Cov Lus Teb Raws Li Kev Nkag Siab
- Kauj Ruam 9: Ua Ib qho Yog-Lwm Cov Lus Ntsuas seb Puas Teb = Tus Nqi 1 + Tus Nqi 2
- Kauj Ruam 10: Yog tias Muaj tseeb, Luam tawm Cov Lus Qhia Kom raug, Teeb tsa Boolean Variable rau Cuav, thiab Ua Ntej Ntxiv
- Kauj Ruam 11: Yog Tsis Yog, Sau Cov Lus Tsis raug thiab teeb tsa tus lej Boolean kom raug
- Kauj Ruam 12: Txheeb Nyiaj Rau Cov Tsis-integer Inputs Nrog Cov Lus Qhia Yuam Kev
- Kauj Ruam 13: Thaum Kawg ntawm Txoj Haujlwm, Luam Tawm Cov Teeb Meem Ntawm N Qhov Uas Tus Neeg Ua Si Tau Txais Txoj Cai
- Kauj Ruam 14: Saib Xyuas Koj Cov Cai
- Kauj Ruam 15: Khiav Cov Qauv no thiab Txaus Siab Rau Koj Qhov Kev Ua Lej
Video: Coding ib qho Ntxiv Game hauv Python: 15 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
- Cov txheej txheem qhia no yuav qhia koj ib qib zuj zus yuav ua li cas txhawm rau txhim kho qhov kev ua si ntxiv uas hais kom cov neeg siv los teb cov teeb meem yooj yim ntxiv uas siv tus lej lej los ntawm 0-9 thiab luam tawm seb lawv puas raug lossis tsis yog!
- Nyem cov duab hauv txhua kauj ruam txhawm rau txhawm rau nws thiab saib cov cai rau qhov ntawd.
Kauj Ruam 1: Tua Koj Tus Python Coding App
- Cov txheej txheem qhia no yuav siv qhov program IDLE Python!
-
Tom qab tshaj tawm, tsim Cov Ntawv Tshiab hauv koj daim ntawv thov Python kom pib coding.
Kauj ruam 2: Ntshuam Random Class
Peb yuav siv nws los tsim cov lej tsis raug
Kauj Ruam 3: Txheeb cais Txoj Kev Python Nrog Kev Hloov Tawm N
- Cov tswv yim ntawm tus lej n yuav txiav txim siab tus lej ntawm cov teeb meem ntxiv qhov kev ua si yuav luam tawm thaum hu!
- Txoj cai no hu rau txoj kev "game (n)".
Kauj Ruam 4: Pib Pib Boolean Variable thiab Integer Variable
- Hauv qhov txheej txheem kev ua si, pib ua Boolean qhov sib txawv kom siv nyob rau hauv 'thaum' lub voj thiab cov lej sib xyaw kom siv los suav qhov sib txawv rau cov lus teb raug.
- Txoj cai no hu rau Boolean "wrk" thiab integer "cnt".
- Nco ntsoov qhov tseem ceeb ntawm kev nkag rau hauv Python, vim lawv txiav txim siab qhov chaws nyob rau qhov twg!
Kauj Ruam 5: Pib 'rau' Loop rau Range N
Qhov no yuav voj rau qhov ntev ntawm cov tswv yim integer n
Kauj Ruam 6: Pib Ob Qhov Random Integer Values Ntawm 1 thiab 10 thiab Teem Boolean Tus Nqi rau Qhov Tseeb
- Tsis pub dhau qhov no "rau" lub voj, siv random.randrange (1, 10) los pib ob qho kev sib piv qhov tseem ceeb ntawm 1 thiab 9.
- Txoj cai no hu cov "val1" thiab "val2".
- Tom qab ntawd teeb tsa tus nqi Boolean rau qhov tseeb!
Kauj Ruam 7: Pib 'thaum' Loop Thaum Boolean Variable Yog Qhov Tseeb
Thaum tseem nyob hauv 'rau' lub voj, pib 'thaum' lub voj thaum Boolean sib txawv yog qhov tseeb
Kauj Ruam 8: Luam ib qho Ntxiv Qhov Teeb Meem Nrog Tus Nqi 1 thiab 2 thiab Teb Cov Lus Teb Raws Li Kev Nkag Siab
- Tom ntej hauv kab ntawv no "thaum", peb tsim cov lus sim-tshwj tsis yog nqe lus.
- Hauv koj qhov "sim" rooj plaub, luam tawm cov lus nug ntxiv uas siv tus nqi 1 thiab tus nqi 2 thiab txhais cov lus teb sib txawv raws li tus neeg siv cov lus nkag (cov cai no txhais cov lus teb sib txawv li "ans").
Kauj Ruam 9: Ua Ib qho Yog-Lwm Cov Lus Ntsuas seb Puas Teb = Tus Nqi 1 + Tus Nqi 2
Hauv qhov 'sim' rooj plaub, sau ib qho yog-lwm nqe lus kuaj seb puas yog ans = val1 + val2
Kauj Ruam 10: Yog tias Muaj tseeb, Luam tawm Cov Lus Qhia Kom raug, Teeb tsa Boolean Variable rau Cuav, thiab Ua Ntej Ntxiv
-
Tseem nyob hauv 'sim' nqe lus, yog tias muaj tseeb:
- Luam tawm cov lus raug!
- Teem lub Boolean sib txawv rau qhov tsis tseeb!
- Kev suav ntxiv los ntawm 1!
Kauj Ruam 11: Yog Tsis Yog, Sau Cov Lus Tsis raug thiab teeb tsa tus lej Boolean kom raug
Hauv kab lus 'lwm tus', sau cov lus tsis raug thiab teeb tsa tus lej Boolean rau qhov tsis tseeb
Kauj Ruam 12: Txheeb Nyiaj Rau Cov Tsis-integer Inputs Nrog Cov Lus Qhia Yuam Kev
Hauv qhov 'tshwj tsis yog', luam tawm cov lus yuam kev rau tus account rau cov lej tsis suav nrog
Kauj Ruam 13: Thaum Kawg ntawm Txoj Haujlwm, Luam Tawm Cov Teeb Meem Ntawm N Qhov Uas Tus Neeg Ua Si Tau Txais Txoj Cai
Tom qab tag nrho cov ntawv sau tseg, luam tawm cov suav ntawm cov teeb meem tawm ntawm n uas cov neeg ua si tau txais
Kauj Ruam 14: Saib Xyuas Koj Cov Cai
- Nco ntsoov qhov tseem ceeb ntawm kev nkag hauv Python, vim tias txoj haujlwm no siv ntau nqe lus zes.
- Koj qhov program kawg yuav tsum zoo li qhov no.
Kauj Ruam 15: Khiav Cov Qauv no thiab Txaus Siab Rau Koj Qhov Kev Ua Lej
- Tom qab ua raws cov theem no txhawm rau ntsuas koj li kev ua lej, mus tom ntej thiab ntaus Run Module.
- Txaus siab rau koj qhov kev ua si yooj yim ntxiv!
Pom zoo:
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev -- Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: 4 Cov Kauj Ruam
Tuchless Hloov rau Cov Khoom Siv Hauv Tsev || Tswj Koj Cov Khoom Siv Hauv Tsev Tsis Muaj Tuch Ib qho Hloov: Nov Yog Qhov Tuchless Hloov Rau Cov Khoom Siv Hauv Tsev. Koj Siv Tau Qhov No Mus Rau Txhua Qhov Chaw Hauv Pej Xeem Kom Pab Tau Tawm Tsam Ib Yam Kab Mob. Lub Circuit Court Raws Li Tsaus Sensor Circuit Ua Los Ntawm Op-Amp Thiab LDR. Qhov Tseem Ceeb Thib Ob Ntawm Qhov Circuit Court SR Flip-Flop Nrog Sequencell
Yuav Tsim Li Cas thiab Ntxig Ib Lub Rooj Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: 11 Cov Kauj Ruam
Yuav Tsim Li Cas thiab Ntxig Cov Lus Thiab Ntxiv Kab Ntxiv Thiab/lossis Kab Rau Cov Lus Hauv Microsoft Office Word 2007: Koj puas tau muaj cov ntaub ntawv ntau uas koj ua haujlwm nrog thiab xav rau koj tus kheej … " Kuv yuav ua li cas ntawm cov ntaub ntawv no saib zoo dua thiab nkag siab yooj yim dua? " Yog tias yog, tom qab ntawd lub rooj hauv Microsoft Office Word 2007 yuav yog koj cov lus teb
RaspberryPi 3/4 Extension Board rau Ntxiv Cov Nta Ntxiv rau Raspberry Pi: 15 Cov Kauj Ruam (nrog Duab)
RaspberryPi 3/4 Extension Board rau Ntxiv Nta Ntxiv rau Raspberry Pi: peb paub tias raspberry pi 3/4 tsis tuaj nrog ua hauv ADC (analog to digital converter) thiab RTC (lub sijhawm tiag tiag) yog li kuv tsim PCB uas muaj 16 channel 12bit ADC, RTC, SIM7600 4G module, thawb cov nyees khawm, tso tawm, USB fais fab tawm, 5V fais fab tuag, 12V
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: Lub Hom Phiaj: Txhim kho cov cuab yeej cuab tam thiab rov ua dua cov ntsiav kom ntxig USB Ethernet CDC Gadget txhawb nqa; Rov tsim boot.img los ntawm Linaro rau khau raj USB Ethernet CDC; Tsim NFS server los tuav lub hauv paus cov ntaub ntawv system; IP teeb tsa hauv DEVICE thiab HOST
Kev Siv Hluav Taws Xob Hluav Taws Xob Tsis Muaj Ntxiv Ib Qho Ntxiv: 4 Kauj Ruam
Kev Siv Hluav Taws Xob Hluav Taws Xob Tsis Muaj Ntxiv Ib Qho Ntxiv: Kuv tau ua qhov hluav taws kub nrawm rau kuv tus Logitech MX500 nas. Muaj ntau txoj hauv kev nyob ib puag ncig, kuv siv qhov no: www.instructables.com/id/Add_a_rapid_fire_button_to_your_mouse_using_a_555_/ Qhov txawv ntawm kuv txoj hauv kev yog: Kuv tau ua nws yam tsis muaj qhov ntxiv