Қайталау операторлары

Slides:



Advertisements
Similar presentations
E.g.9 For to do loop for i:=1 to 10 do writeln(i); While do loop i:=1;
Advertisements

Selection Process If … then … else.... Condition Process 2 Process 1 Y.
Bµi 10. Bµi to¸n 1: Bµi to¸n 2: C¸c bµi to¸n ®Æt vÊn ®Ò : TÝnh tæng S, víi a lµ sè nguyªn vµ a>2 cho ®Õn khi.
MAIN BODY OF PROGRAM DECLARATION ACTION
Looping while … do …. Condition Process 2 Process 1 Y Repeated Loop.
1 Arrays in JavaScript Name of array (Note that all elements of this array have the same name, c ) Position number of the element within array c c[6] c[0]
Records Dasar Pemrograman. RECORDS Record data types—a complex type that combines different data types into a single record. Sometimes called set types.
2.4 – Zeros of Polynomial Functions
1 Pearson’s Linear Correlation Coefficient  Given: At a concert, the number of tattoos, x, and the number of piercings, y, that a person had was recorded:
The Real Number System. The natural numbers are the counting numbers, without _______. Whole numbers include the natural numbers and ____________. Integers.
06/25/091 Computer Interfacing Via the Parallel Port Carlos M. Oppus ECCE Program, AdMU.
ARRAY PADA PASCAL DOSEN : NURAINI PURWANDARI.
Foundation Studies Course M.Montebello Records Foundation Studies Course.
NUMBERS Natural Numbers, Whole Numbers, Integers, Rational Numbers Irrational Numbers, Real Numbers, Prime Numbers, Composite Numbers.
Power of a Product and Power of a Quotient Let a and b represent real numbers and m represent a positive integer. Power of a Product Property Power of.
 Can be put in fractional form  The decimal form of the number either terminates (ends) or repeats.  Counting numbers, whole numbers, integers and.
Национальная процедура одобрения и регистрации проектов (программ) международной технической помощи (исключая представление информации об организации и.
Arithmetic in Pascal A Short Glance We will learn the followings in this chapter Arithmetic operators Order of precedence Assignment statements Arithmetic.
The Real Number System -13 O, 1, 2, 3… 1/ π.
The Real Number System. Whole numbers Whole numbers Rational numbers Whole numbers Natural numbers Integers / ¾ 18% π √2√2 − ….
Loops Brent M. Dingle Texas A&M University Chapter 7 – part B (and some from Mastering Turbo Pascal 5.5, 3 rd Edition by Tom Swan)
Medina  Natural : Medina2 Any number that can be located somewhere on a number line Counting Number Counting numbers including the.
Вложенные циклы Применение. program matrix; uses crt; var x,y,y1:integer; symbol:char; BEGIN clrscr; randomize; repeat y:=random(48)+1; x:=random(80)+1.
5.1 Exponents. Exponents that are natural numbers are shorthand notation for repeating factors. 3 4 = is the base 4 is the exponent (also called.
Lesson 7.4 Objective/Topic: To approximate square roots of non rational numbers. To classify real numbers EQ: How can you find decimal approximations of.
基 督 再 來 (一). 經文: 1 你們心裡不要憂愁;你們信神,也當信我。 2 在我父的家裡有許多住處;若是沒有,我就早 已告訴你們了。我去原是為你們預備地去 。 3 我 若去為你們預備了地方,就必再來接你們到我那 裡去,我在 那裡,叫你們也在那裡, ] ( 約 14 : 1-3)
FOR LOOP STRUCTURE For := to do eg. for I := 1 to 100 do begin writeln(‘This is a loop’); end;
Computer Science 1 9/10/2014 Review Dry Run Math in Pascal How do you start, when you don’t know where to start?
1-1 REAL NUMBERS Bell-work 1.) 2x + 1 = x + 6.
Exponents 8/14/2017.
تهیه و تنظیم: فاطمه قاسمی دانشگاه صنعتی شریف – پاییز 86
Потпрограми во Pascal.
Review Dry Run A Little More Math Fix it Online time
CMP 131 Introduction to Computer Programming
'. \s\s I. '.. '... · \ \ \,, I.
Scrolling text repeating until end of slide.
The Complex Number System
Көңіл күйлеріңіз қалай?
ratio ratio repeat terminate repeat terminate
(as opposed to fake numbers?)
Сызықтық алгоритмдерді бағдарламалау
Lesson 1 - Irrational Numbers
Liên kết các ngôn ngữ bậc cao với ASM
Бірөлшемді жиымдар Паскаль тілінде бағдарламалау
Computer Science 1 Online time to complete/enhance second repeat program Be able to read and write a program that uses the ‘case’ statement.
تهیه و تنظیم: فاطمه قاسمی دانشگاه صنعتی شریف – پاییز 86
13.1 Exponents.
Real Numbers COURSE 3 CHAPTER 4 1. yes 2. no 3. yes
Review Dry Run Taking Names Online time Math is Good
kbkjlj/m/lkiubljj'pl;
Слайд-дәріс Қарағанды мемлекеттік техникалық университеті
Computer Science 1 Get out your notebook
TEST II razredi.
.. -"""--..J '. / /I/I =---=-- -, _ --, _ = :;:.
Қайталау операторлары
Repeat Day2 Dry Run Second Repeat Program
Lesson Quizzes Standard Lesson Quiz
II //II // \ Others Q.
I1I1 a 1·1,.,.,,I.,,I · I 1··n I J,-·
' '· \ ·' ,,,,
Vježbanje.
Паскаль тілінің басқару
9 сынып 8 сабақ Сабақтың тақырыбы: Дейін циклі REPEAT операторы.
Real Numbers Natural Numbers Whole Numbers Integers Rational Numbers
Natural Numbers The first counting numbers Does NOT include zero
Essential Question: How can we determine if the model for a function should be discrete or continuous?
Types of loops definite loop: A loop that executes a known number of times. Examples: Repeat these statements 10 times. Repeat these statements k times.
Computer Science 1 Get out your notebook
Computer Science 1 Get out your notebook
. '. '. I;.,, - - "!' - -·-·,Ii '.....,,......, -,
Presentation transcript:

Қайталау операторлары 9 сынып Сабақтың тақырыбы: Қайталау операторлары Әзірше циклі WHILE операторы

Сабақтың мақсаты: Цикл дегеніміз не? Цикл түрлерін қайталау; Паскаль тіліндегі циклдік операторлармен танысу; Шартты алдын ала тексеретін циклмен танысу: WHILE операторынын құрылымымен танысу; Цикл командасын Паскаль тілінде жазу; Программа жазуды үйрену. Есеп шығару.

Цикл дегеніміз не? Цикл – бұл шарттың сақталу кезінде командалар сериясын қайталап орындау үшін берілетін нұсқаулар. Цикл денесі – орындалатын командалар сериясы. Қайталану санының алдын ала белгілі және белгісіз болуына байланысты цикл екі түрге бөлінеді: 1. Арифметикалық цикл –кайталау саны белгілі; 2. Қадамдық цикл – қайталау саны белгісіз.

Циклдік операторлар Паскаль тілінде 1.Әзірше циклі – шартты алдын ала тексеретін цикл: WHILE <шарт> DO <цикл денесі> 2. Дейін циклі – шартты соңынан тексеретін цикл: REPEAT <цикл денесі> UNTIL <шарт> 3. Үшін циклі – қайталау саны алдын ала белгілі цикл: FOR <айнымалы > := <S1> TO <S2 > DO оператор S1, S2 –цикл параметірінің алғашқы және соңғы мәндерін анықтайтын өрнектер.

Сөздік WHILE (уаил) - әзірше DO (ду) – орындау (соңына үтір қойылмайды) REPEAT (репит) - қайталау UNTIL (антил) - дейін FOR – үшін TO – дейін

Әзірше циклінің жазылу түрі: Алгоритмдік тілде: Әзірше шарт Цб 1-оператор 2-оператор ... n-оператор Цс Паскаль тілінде: WHILE <шарт> DO Begin <1-оператор>; <2-оператор>; ... <n-оператор>; End; Ескерту. Егер шарт бірінші тексергеннен-ақ жалған болса онда цикл орындалмайды.

1 есеп. Бірінші 10 натурал сандардың қосындысын табу программасын құрастыру. Блок-схема: Program summa1; Uses crt; Var i: integer; (і - есептеуіш) S: integer; (S – қосынды) Begin Clrscr; S:=0; i:=1; WHILE i<=10 DO S:=S+i; i:=i+1; End; Writeln (‘S=‘,S); readkey; End. басы i:=1 S:=0 жоқ i<=10 иә S:=S+i Шығару S i:=i+1 соңы

Var i: integer; (і - есептеуіш) S: integer; (S – қосынды) Begin 2 есеп. 10-нан 50-ге дейінгі жұп сандардың қосындысын табу программасын құрастыру. Program summa2; Uses crt; Var i: integer; (і - есептеуіш) S: integer; (S – қосынды) Begin Clrscr; i:=10; S:=0; WHILE i<=50 DO S:=S+i; i:=i+10; End; Writeln (‘summa S=‘,S); readkey; End.

Үй тапсырмасы: Келесі өрнектің мәнін табу программасын құрастырындар: S=1/2+1/3+1/4+1/5

S=1/2+1/3+1/4+1/5 өрнектің мәнін табу программасы: Program summa3; Uses crt; Var x: real; S: real; Begin Clrscr; S:=0; x:=2; WHILE x<=5 DO S:=S+1/x; i:=x+1; End; Writeln (‘summa S=‘,S); readkey; End. S=1/2+1/3+1/4+1/5 S:=0 S:=S+1/x S:=0+1/2=1/2 S:=1/2+1/3=5/6 S:=5/6+1/4=13/12 S:=13/12+1/5=77/60 S:=1.2833333…