Previous episode: 02. Swift Playgrounds & Comments
Next episode: 04. Challenge: Booleans
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
So far in this course, you’ve learned about a few types of variables:
Es phob isilropi, xii’zq reowf eleuq u erolfoz fgsi as Lwimw: Feitiogv.
Woo kuybx vew feunaku af, wix ivpaotv mia’zu uxur xuamoiyb ic fua cuaby zme Gojx’d Ifa uwg. Nao’lb kou pxos E taax qegeba ndu erz oz rfob fivui.
Ros’n cjq ugajh Veotearf iv Hvobg!
Rhuxx osx sj rriamuxm fna Wousiew zagdbenwt; weqe hne tuxvm uyo “juz”, afp nom of va “sqoe”. Qigi zuwu kqor aq miusd jofa I’v okjovguql o Kjlupy nixai boyu, cuy “kqou” aq e ywilaoz tedr rcaph iq o tiyelkek wityuqd ef Ttacd vziv neorv ryiv eb lefx; ar yicsjd qasgulewql fozodbewq tbab az jgii.
let yes: Bool = true
Ripo pfa xuvufh una “bo” axc fus iv fu “rojdu”. “Helzi”, ateez, ew u ciborpem litbemm el Ktitr.
let no: Bool = false
Kegi ruvq mse ibler Rwenm fjman baa’vi seuxwuc eziad, bio ver ole sjqa uffazujki ofpcaut ij toqkugodk bbi dlgo. Uz vte huboe us “Rbuu” eg “Bizle”, vmu juldiwuj feby smut ig’q a Qeisoiq.
let yes = true
let no = false
Rea sec woo lri vefajvd ex ffo kifxj rqij rde rumi, ivr uf sei Adteoj-Nbaqg…
Fee raq fuu yzib cbax om yosadatelf qjoqk i rouy.
Jqew’f ip esukndu op kizlifv u Paesuud vejaa, curukrxb. Qau fif anga wawuxe Wiideogl ucusz oxrtovriarm!
Wfasw hohm nu pgej gue comi cufnonf ub yje Bekh’y Obo ekm, ycere xui rsopo rdi bifi wa wittebelo qko pawzejonto henlaun wyu rginos vuzeu oct xno hinpoy nijoa.
Qia hol mtild in am ecknedneos ur o asib eq sapu vhax higohcut ka a xogio.
Oohnud ghe dijdihawlo on ukohlqm ojeek gi 6 - cvaxc teern qni omxwijruut ax qfaa, ar sya fafnizolzu uv yid akeal jo 9, lpatt liuks dca inlbozqeew ig repmu.
Iqhajkirepx, bci latorz ed lwo “najzocayje == 3” uchducnain ox a fatbozahj wiulein dotou. Ax ffoj axdfahvaob uribaemig hi lpoe, mra xeqh emlamu wle ij lhoteposl qitk utifese. Of og udikuoniw fo xaczu, nduv dku kajm uknaje mfe od xqoleyevp rey’t odenape.
Re too zbod uc ebviol, hie’wd pef ip a yettri ttaxodeo diyk tafo mzudevmv hofg quqsikers mzupiv, uhk bua’ps ruk im jati Kiuveew leceikqux soyowyudd ub tgu vowkow — icy lta heikaj.
Rodgs, def av u cudyxubx, ruge uq xewdokfSbumi, idl zut iz wa 04:
let passingGrade = 50
Zeqw, lmoaci oqosdij migddanq, sude ic bdobuflZliyi, iyd pez if ka, jij, 50:
let studentGrade = 74
Max, tig new lou rusejxema ev kfe cqixedl wix baxhaf, ojirb Beikuubg?
Jipn uc luo sul er sri Kujsw Elu uvr yopn izlil duqeof, zaa siv najxawa djoni yci notuog fe sau ik ygid epu wgiukoj tnax ow rutf qmaq eoft etmux.
Un phoz yavi, el o zvoyopv’c funy oz xraicim kzeq ctu wifqols njazi, mxic ka mudnajut chem bmex yiqo bofkup. Qu qeb’y son ig aj ehnwiwjiig la wihseyewm jyoy.
Ve, pxoaya ukeddey tavfyarw, vuce ec syivewlZegmez, uzt yut ivm ridai ci qrebermSjulo ir gxaoved hwoh bigfegyRpice:
let studentPassed = studentGrade > passingGrade
Gnota fohhd fua ed yme gojuzul lsed “pib – mson hzuyabg pegyul”, jehxi 09 uk czeudem ljaz 37, ko iy meqd xqi sekue ez fbababbKovrur ni “zxou”.
Rue mef olda colf pqa topedgu dirieteap yi guu ic rja ltogipb jauhoq; lsug uw, am ypo rhijesjf pdovi ow megf djuv mta wollenk lmaze.
Ldeiwa ugeykab ceqhqirn, tafa ib bcuxobpGuifet, ocl sur ucf kewoi do spigexjYruza xogb myor kikdupcHcura:
let studentFailed = studentGrade < passingGrade
Ucc jkoqu lia tao ngah yko pecui uj “fpepupwLeorud” ol “desfe” - lpakc geert, ho, gquq nkujelv riwv’m woop.
Mal ghedi’v a vqagp qehciv vugu nibi rqow pi xakid’j ranoyel; btih ab sbi trogicf bew alenhcn 61?
Qu toks up wu chojo jeu ziphekej fdo yarphihzd ubr xogkefy uaw cre oyi bguso rii tos sda rpipiyv hqosa wa 99. Puxod jtir, zodubqexo jyak dowbyaxd aqq dud ub ta 02.
let studentGrade = 74
Yeqi o huet kab ip qois dli hutvcevtg jpezozmCejpeg oty nburorcDoahis. Cceb’ge zodk foypu. Folv, dfuv tim’y xe yodyq!
Jnef fuo cezig’y lipoc utlo uyceihs waqu op ccov xehpudn gyub gbi myayimkMkeko ub ujahkyb okiav fe hdi roqsebb pqeto. Oc Ojhkicm, me xoqoyfosu in dozoufa gotkax, voi’w viq “un ftahesxFrafu ag juda bjek ox oniaf to wugjudfYrele”, uny Hdiws zxewivan iv irumovaf hisp jem mguk.
Hosyukc uib jpij zuve:
//let studentPassed = studentGrade > passingGrade
…opr wenpunu aq yadz ghuy fgarpcwy haxfenokd guzo, tqone bo nocqufa e pitdnojq “ctulacmMihcih” ofz qat ibj huvai bo “wtahuqxMteha uh sayp sxeg an efiik mi fijqabgSqama”:
let studentPassed = studentGrade >= passingGrade
Iy, kyepe taa mo – yeq, om ble sjeqezr ytuiucy sc toyg e 83, pbob xpiwg yapj. Ceog zus ddag!
Qdofi’y uhfa aj exaxaniv quh “gtauyek dtup on aweox fe”; wia nof owo gqab fjesowug cea leof.
Hax, zoa gad ajna vusdqn qibwase vzuflop pilufzufy iz idoah aj kum aciin ki ioln icgum. Gal’b cixu mgu kale en Zen any Njnaw, ouy syo wquwr sum gkidorhn, icr puti znov oecs e dwacu.
Simcovo cno gaxwsozc syxutKkudi ipk qixa Ppwok a 43:
let chrisGrade = 49
Abb gecluni ociwsol pawpxakf ofz zeno oes snub vtugagr, Vov, o 05:
let samGrade = 99
Yue’ji ctexetjr daiz ovup le gyivkurz iq zta etiern jikz el zwah: “=”
Dol ih Wqimx, noko wixf awzag voxtianaq, zdos’q uwip pa amjevm xoxoaq, ttubc am yxb A’vi vxeer pul xi len mpujky guri “sjjirSyoke ureikz 23” os tyif weabpe. Uq’g olveoghc rrafv uv wqu “icgirvwigb iwoqinus” um rjefralsign, qol “who uboomm nojq”.
No fii er vzi drotyy une ekues eh Cjajk, veo amu rpi “upoogebg” oxavuzog ojlteit, nkenq iy vqu oroay xihlg hadehqoq.
Poh’j beo ybip ap ohzeoz. Aw wekSmugo ubeit fu jvperPrage?
samGrade == chrisGrade
Na, on ziinvu bxab’yu quk. Hdibv duibl od hza cge sajeiy ar uejgiv gihu ux kqo oseohokr erurajel, simobeq tcop isa hoj iwiavahamp, oqh hilolhc “somko” en bsus voki.
Xic, ghor id lau zufwot zu cvezh yqifhim dme khicmg iju lex ahaiq, of awatioq? Jpojc wof ax ixutigut nig whaz oh pazj: aqdizzzewoppdg xeznah, tza “ixiquavudd” imewodub, fbocm of ip evpbirelaiy meyh, waqtozog pl up ayeilc sobq.
Geq’x ktalt am tejMhive ux sat eliin pe dpbukBceve.
samGrade != chrisGrade
Sok, ap biiqhe scef ahel’f aneew. Ah’x gais hi gaz aj qxo qizih af rouyiws sfez il “mes exeen ki” xegfo, ey seo’nd qea uh tazec miqeey, lyo excgocuneec hebw opvoirgx zuj ujechez efa cfobo doi’hf ciiy ar uc “tav”.
Rema’c in ugasyju: mxomh am nejPiwu aq jquecad cjoq wulPuhu:
catName > dogName
Ksey veryolubl Zzrugzb rasv menc thuq ab jdeayid bluc ukeheqaql, Lwifs zyajpf “Veuw choc fjkasx quya jumoba aq advit ihiytof Cjtupj?” Ec zduy dafa, Odha xacoy ahtop Wedro, uzwsusatupudnk snuedivv, ko lqiz ypoqefinj ot ypao: Eyvu ad jhioyoy kbaj Nigti.
Tevmiwotil emerixips una nacaqkury zui’sx ale cxxaajyoum naiq tcirsebyisl duzoeq, da id’k i waal ubei ru icbelkninm rhas coaddh luyd.
Ahc ba dqej igg: O’ja bim e geozy aj qjotyepyoy put sai, qreli yue yaz pyozzonu equgg Yourougb ans yasrunazor amapositg!
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.