Cov txheej txheem:

Micro: ntsis Memory Game: 4 Kauj Ruam
Micro: ntsis Memory Game: 4 Kauj Ruam

Video: Micro: ntsis Memory Game: 4 Kauj Ruam

Video: Micro: ntsis Memory Game: 4 Kauj Ruam
Video: Hmong New Song 2019 Xy Lee feat. SuabNag Yaj - Koj Yog Kuv Lub Neej (Official MV - 4K) 2024, Hlis ntuj nqeg
Anonim
Micro: ntsis Memory Game
Micro: ntsis Memory Game

Kev ua si nco yooj yim, qhov uas koj yuav tsum nco qab ib ntu thiab teb yog tias zaum thib ob nyob ib puag ncig, qhov ua ntu zus yog qhov zoo ib yam. Txhua qhov puag ncig ib kauj ruam ntxiv tau ntxiv rau qhov ua ntu zus.

Kauj ruam 1: Txuas Koj Micro: ntsis rau lub khoos phis tawj

Txuas koj Micro: ntsis rau lub khoos phis tawj
Txuas koj Micro: ntsis rau lub khoos phis tawj

Tsuas muaj ob yam peb xav tau txhawm rau ua qhov kev ua si nco no:

ib: micr

ib lub computer rau coding

Yog tias koj tsis muaj micro: me ntsis tsis tau, tau txais ib qho! Lawv yog qhov tsis txaus ntseeg lom zem me ntsis los ua haujlwm nrog, thiab txoj hauv kev yooj yim rau cov menyuam nrhiav pom thev naus laus zis thiab kev ua haujlwm.

Txhawm rau ua kom peb lub teeb ci, koj yuav tsum txuas koj lub micro: ntsis rau lub khoos phis tawj ntawm usb-cable.

Kauj ruam 2: Mus rau Micro: ntsis Python Editor

Mus rau Micro: ntsis Python Editor
Mus rau Micro: ntsis Python Editor

Txhawm rau tsim qhov kev ua si, peb yuav tsum tau tso qee cov lej ntawm peb cov micro me. Txhawm rau ua qhov no, mus rau:

Xaiv cov cai yooj yim uas tau muab, thiab muab cov lej hauv qab no rau tus kho:

# Ntxiv koj tus lej nab npawb ntawm no. Egfrom microbit ntshuam * ntshuam random # tsim cov lus qhia ua = ["A", "B", Image. ARROW_N, Image. ARROW_E, Image. ARROW_S, Image. ARROW_W] # kev ua si dav dav txav = gameover = Cuav def show_moves (): display.show (txav, ncua = 1000) pw (1000) display.show ('=') pw (1000) xaiv = (random.randint (1, 2)) yog xaiv == 2: display.show (txav, ncua = 1000) pw (1000) elif xaiv == 1: ntev = len (txav) -1 newMoves = daim ntawv (txav) newnr = (random.randint (0, ntev)) oldmove = newMoves [newnr] newmove = random.choice (ua) newMoves [newnr] = newmove yog oldmove == newmove: xaiv = 2 display.show (newMoves, ncua = 1000) pw (1000) buttonpressed = Tsis tseeb thaum khawm == Tsis tseeb: display.show (' ? ') yog xaiv == 2: yog button_b.was_pressed (): rov True buttonpressed = True break elif button_a.was_pressed (): display.show (Image. HAPPY) pw tsaug zog (2000) buttonpressed = True return False elif xaiv == 1: yog tias button_a.was_pressed (): rov True buttonpressed = True break elif button_b. was_pressed (): display.show (Image. HAPPY) pw tsaug zog (2000) buttonpressed = True return False def ntxiv_nextMove (): moves.append (random.choice (actions)) # game thaum gameover == Tsis tseeb: add_nextMove () gameover = show_moves () display.scroll ("Missed..") display.show (Image. SAD) pw tsaug zog (2000)

Kauj Ruam 3: Tshaj Tawm Txoj Cai rau Koj Micro: ntsis

Ua ntej tshaj plaws, nco ntsoov tias koj lub microbit txuas nrog koj lub khoos phis tawj.

Hauv tus kws kho ntawv, nyem Rub tawm hauv lub kaum sab saud sab saud, txhawm rau rub tus lej rau koj lub khoos phis tawj, thiab rub thiab tso cov ntawv hauv cov ntawv tshawb fawb rau koj lub microbit.

Lub teeb txiv kab ntxwv nyob tom qab ntawm koj lub micro: me ntsis yuav pib ntsais muag. Sai li qhov hloov pauv tau ua tiav, txoj cai yuav pib ua haujlwm thiab thawj theem ntawm qhov kev ua si yuav pib!

Kauj ruam 4: Ua si

Ua si!
Ua si!

Txhawm rau rov pib ua si, nias lub pob tom ntej ntawm usb-chaw nres nkoj ntawm koj micro: ntsis, uas ua raws li khawm rov pib dua.

Koj yuav pom ib lub cim, ua raws li '='-kos npe, cim thib ob thiab cim cim nug. Piv txwv li: A = A?

Qhov kev ua si yog qhov yooj yim: thawj ntu sib npaug qhov thib ob?

Koj puas xav tias nws ua? Nias A. Koj puas xav tias nws tsis ua? Xovxwm B.

Yog tias koj muaj hmoo, lub ntsej muag luag ntxhi yuav tshwm sim, thiab koj yuav mus rau lwm qhov ntxiv, ntxiv lub cim rau ntu.

Yog tias koj tsis muaj hmoo, lub ntsej muag tu siab yuav tshwm sim.

Tsuas yog sim dua los ntawm nias lub pob pib dua nyob tom qab!

Txaus siab rau!

Pom zoo: