Lub hom phiaj ntawm IF THEN nqe lus yog dab tsi?
Lub hom phiaj ntawm IF THEN nqe lus yog dab tsi?

Video: Lub hom phiaj ntawm IF THEN nqe lus yog dab tsi?

Video: Lub hom phiaj ntawm IF THEN nqe lus yog dab tsi?
Video: Qhov Kev Sib Txheeb Ntawm Vajtswv thiab phau Vajluskub Yog Dab Tsi? 2024, Hlis ntuj nqeg
Anonim

Cov yog - ces Tsab ntawv

Cov yog - ces nqe lus yog qhov tseem ceeb tshaj plaws ntawm tag nrho cov kev tswj ntws nqe lus . Nws qhia koj qhov kev zov me nyuam kom ua tiav ib ntu ntawm cov lej nkaus xwb yog ib qho testevaluates kom muaj tseeb.

Tsuas yog li ntawd, lub hom phiaj ntawm yog hais tias yog dab tsi?

Ib yog hais tias yog programming conditional nqe lus uas, yog ua pov thawj tseeb, ua a muaj nuj nqi los yog qhia cov ntaub ntawv. Hauv qhov piv txwv saum toj no, yog tus nqi ntawm X tau sib npaug rau ib tus lej tsawg dua 10, qhov program yuav luam tawm, lossis tso saib, "nyob zoo John" ntawm lub console thaum tsab ntawv khiav.

Qhov thib ob, lub hom phiaj ntawm kev hais tawm hauv cov lus IF ELSE yog dab tsi? Hauv computer science, cov lus qhia , xwm txheej thiab raws cai constructs muaj cov yam ntxwv ntawm cov lus programming, uas ua cov kev suav sib txawv lossis kev ua haujlwm nyob ntawm seb tus programmer-specified boolean mob ntsuas qhov tseeb los yog cuav.

Kuj tseem yuav paub yog, qhov piv txwv ntawm IF THEN nqe lus yog dab tsi?

Peb yuav piav qhia qhov no los ntawm kev siv ib qho piv txwv . Yog koj tau qhab nia zoo ces koj yuav tau mus rau hauv ib tug goodcollege. Ib feem tom qab " yog ": koj tau qhab nia zoo - hu ua qhov kev xav thiab ib feem tom qab" ces " - koj yuav nkag mus rau hauv tsev kawm qib siab zoo - yog hu ua qhov xaus.

Koj yuav sau ib nqe lus li cas?

A nqe lus hais (tseem hu ua If-Then Nqe lus ) yog a nqe lus nrog ib tug hypothesis tom qab ib tug xaus. Lwm txoj hauv kev los txhais a xwm txheej yog hais tias, "Yog tias qhov no tshwm sim, ces qhov ntawd yuav tshwm sim." Lub hypothesis yog thawj, lossis "yog," ib feem ntawm a nqe lus hais.

Pom zoo: