0:00:00.320,0:00:03.740
Komputerlarning yaxshi jihatlaridan biri bu buyruqlarni qayta bajarishi.
0:00:03.740,0:00:08.170
Inson sifatida, agar siz bir xil narsani ko‘p marta qilishingiz kerak bo‘lsa, [br]haqiqatda zerikib ketasiz.
0:00:08.170,0:00:08.809
0:00:08.809,0:00:12.849
Ammo komputer bir xil narsani million yoki hattoki[br]milliard marta ham qila oladi,
0:00:12.849,0:00:15.000
va zerikmasdan yaxshi holatda bu narsani oxirigacha yetkazib qo‘ya oladi.
0:00:15.500,0:00:17.430
Shunday qilib, misol uchun, agar men Facebookdagi barchani
0:00:17.430,0:00:20.960
email jo‘natib tug‘ilgan kuni bilan tabriklashni xohlasam,
0:00:20.960,0:00:24.850
bu emaillarni barchaga yozib chiqish uchun menga bir asrdan ko‘p vaqt[br]ketadi.
0:00:24.850,0:00:25.269
0:00:25.269,0:00:28.760
Lekin bir necha qator kod bilan, men Facebookdagi [br]barchaga tug‘ilgan
0:00:28.760,0:00:32.229
kuni bilan tabriklab email yuboradigan[br]sistema tuza olaman.
0:00:32.229,0:00:34.000
Mana looplar nima, va nima uchun ular qiymatli
0:00:34.500,0:00:37.180
va ular komputerlar juda yaxshi bajara oladigan jihatidan biri.
0:00:37.180,0:00:40.550
Bu misolda, sizning maqsadingiz qushni cho‘chqaga yetishishi
0:00:40.550,0:00:44.940
uchun harakatlantirish. Hozir, biz buni juda ham oson bajarish uchun
0:00:44.940,0:00:49.210
"repeat" bo‘limidan foydalana olish imkoniyatiga egamiz. Yoki siz buni
0:00:49.210,0:00:52.219
har safar qushni cho‘chqaga nisbatan bir qadam oldinga chiqarish maqsadida
0:00:52.219,0:00:57.079
komputerga besh marta "move forward" buyug‘ini berish orqali ham bajarishingiz mumkin.
0:00:57.079,0:01:00.590
Yoki siz komputerga shunchaki bir marta oldinga harakatlanishini ayta olasiz,
0:01:00.590,0:01:04.150
va keyin unga bu jarayonni 5 marta qaytarishni aytishingiz mumkin[br]va u xuddi shunday qiladi.
0:01:04.150,0:01:08.280
Shunday qilib, buni qilish uchun siz "move forward" buyrug‘ini [br]olib keling,
0:01:08.280,0:01:11.729
va keyin uni "repeat" bo‘lim ichiga qo‘ying.
0:01:11.729,0:01:16.200
Va siz uning ustiga bosa olasiz va unga qancha qadam oldinlashini xohlashingizni
0:01:16.200,0:01:19.970
aytish uchun bo‘limni necha marta qaytarishini ayting.[br]Endi yana bir narsa bu
0:01:19.970,0:01:23.540
siz repaat bo‘limi ichidagidek [br]ko‘p buyruqlarni qo‘ya olasiz.
0:01:23.540,0:01:26.909
Demak, bu misolda siz unga besh marta bajarilishi kerak bo‘lgan
0:01:26.909,0:01:30.970
oldinga harakatlanishni va chapga burilishni aytayapsiz.[br]Juda yaxshi ish, rohatlaning:-)
0:01:30.970,0:01:31.220