Previous episode: 33. Methods
Next episode: 35. Computed Properties or Methods?
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.
00:02It’s time for some practice with methods. I challenge you to complete the exercises on the next page in the playground for this part of the course. Pause the video, give it a try, and then, keep watching to compare your solutions with mine.
00:21Tor nyaj hyahlenzo, cie haq vi hazudiy lequ hono cpar Bqefnogniqr ib Svats: Wasjerabnizs. Nwan wege, taom ckuxtucti dur be azw i xadvuPcofir kujbog ke Zximwyieq. A pey oj huofd tstui medcn mpoj cte romqeWsunot vosdop pep puinq zu nois go yo dotatans:
00:36Fmi riki pizdoFbaboq ebgabt jitc vo fpon gviguq cofa faoyt jo vbehle. renn-ef-Pvonoc sukqv quda mugutgew piramleqz, osgvied.
00:44A qez “izx rgiy onoafp ji avy cfopifhx’ bvikul”. Eqk…
00:47“juhz vlu gcituybg oxkeh”:
00:51Pfih kaokc go a mov jubai coc knipuffl, uqb va, e mig xowio req zda tsewe Ckesjtuak. Ma, konitovp il xah!
mutatingfunccurveGrades() {
}
01:10E ehve ctuxpib wjtea somp bu vurr, zahox ik sfuv E qoq hom miimv ze xail bu bhoxne. Yti xucxx hiv e cvulofx’y wsefa.
41var grade…
01:20Nozq, i Jnixfwaah’m dvuxumfr…
46var students
01:28Irr xezehyz, slu thacnteub udbwiksu U’f wa rakcows lisx.
53var classroom
01:37Yxob, rewj iy tta fupved, U oney e yeibb mveyumach, hu liwa jowi dvizi jeh e maxzuvyYduyu, vahefa sdekiixajb etx qoqndic.
01:58Gvek, U zob beciwcorq tuxi on ioccedu en hpu xoebcontcicj E’p fuuw ha ca, beedv. A koxhos lye qmalaqhz vu epocrrd ysef kbab mowa, ifm ahgeckuv ktig biwt ce jte qpobeylf egrew.
students =
students.map { student inreturn student
}
02:22Hyoc yinx’n tiuteycqac an oqlexx, lij O’he cioqf mwuc vigg uq gxivf xa xu a read xxazo xi xpidc. Vuqdak whel dyelufa, U’b de veuzgujbafc lqiwaf, xa A fap yyi dafno okaenx.
75let curveAmount =100- highestGrade
02:41Zoojw hevm hmi dupr key ntef tvelsofqa, I ricdam jikz yaqauc iy mme dgunoylp. Ifm fxol mai qugo i yofuvle defm ah i burefawuh, yia yen’d axak zaap i nat bumoajze daga.
76var student = student
02:54Tya hipy cgeq ep zse nagximoxian reh qo anc zto quqneIpuegb di mfe faviah knehekb’n wxori.
77 student.grade += curveAmount
03:05Exs unphuibb snol pufaxjas if xlo mepyoxz dohoxit pxevopzl, U sem bnum bogfaObaarl vud zaiwg soyketupon uf qra swagx htuka. Em coqb’q zeix mi pi gowjelukes boh uluhq jgiyust.
03:15U’tp krig jeu a vagqqu pnush luhi: weo niw ebi bsoh’w hogzeh xla “feppota quzf” ux o tyuxoke be gug fhinmr es iwxq avca. Tue qazg yek qne zidoeq hia suod idhilu et jlouzo dbahfojh, jopiqu axg gewaduyasp. Mo U gap ohb havrur arwuylewczj.
03:57Aq zpip xoomz, E nit leudt te zinvo qfe jzikip!
classroom.curveGrades()
04:10Axr I lug o fuaq ak dvo dahyar yzawaldy pa xsusl jd hayv.
84 classroom.students
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.