5.2.1.1 Использовать визуальные элементы окружающего мира и выразительные средства искусства для передачи своих идей и чувств
5.2.3.3 Использовать элементы казахской национальной культуры, в процессе создания творческих работ и изделий
5.2.6.1 Использовать материалы и инструменты, соблюдая технику безопасности, осознавая и демонстрируя её важность
Demo lesson:
Conditional Statements and
Logical operators
Оператор выбора
Таңдау операторы
YOU WILL:
×identify comparison operators;
×apply if/else statements;
×learn and apply Logical operators (AND,OR, NOT);
×8.3.3.1 - таңдау және қайталау операторларын
программаны өңдеудің кіріктірілген
ортасыныңда қолдану;
×8.3.3.1 использовать операторы выбора и
циклов в интегрированной среде разработки
программ (С/С++, Python, Delphi, Lazarus)
If / else statement
If / else statement is a decision
between two things.
For example, if it is a weekday it is
time to go to school. Otherwise,
you can stay home.
We use ‘if’ statement for making
only one decision.
Switch
Switch case statements are a substitute for
long if statements that compare a variable
to several integral values.
●The switch statement is a multiway branch
statement. It provides an easy way to dispatch
execution to different parts of code based on the
value of the expression.
●Switch is a control statement that allows a value to
change control of execution.
Select - таңдау - выбирать
Indentation- шегініс - отступ
to compare - салыстыру –
сравнивать
Conditional - шартты – условный
value - мән - значение
variable - айнымалы - переменная
Discuss the following pictures
Обсудите следующие
фотографии
Find errors in the program fragment:
Найдите ошибки в фрагменте программы:
{
float x; cin >> x;
switch (x)
{case 1: cout << «good»; break;
case 2: cout << «bad»; break;
default: ;
...
}
int k=0;
float m=k+2;
switch(m%2)
{case 0: cout<<"m- четное"; break;
case 1: cout<<"m- нечетное";
…
}
Варианты ответов:
1. не хватает в строке,содержащей с case 1,оператора break
2. переменная m может быть только целого типа
3. нельзя после switch писать выражение m%2
4. отсутствует ветвь default
Questions
1.What is the function of the
Case of statement?
2.What is the option?
Response to question
1.This is the CASE operator which
is a generalization of the IF
operator and allows you to make a
choice from an arbitrary number
of available options.
Response to
question
saved in the worm
2.Specifi is that the value of
this combination field will
not be written in the
clatabase and will only be
r
Practical work at
the computer
Questions
3.What is the action of the
RadioButton component?
3.The RadioButton
component is ussually
used along with other
switches to select one of
the mutually exclusive
alternatives
Questio
4.What action does the
ns
CheckBox
component perform?
Response to
question
4.In the CheckBox
component a chec
mark is located in the
gray box
Questions
5.What is the function of the
Caption component properties?
Response to question
5.Descritive text appearing
on an object to define or
describe it.
6.What are the properties
know?
of the selection
components, what types
of components do you
6.The properties of the
components
BitBtn,RadioGroup,
ChecBox,RadioButton,
Memo,Image
Home work.
Сreate a project in
Lazarus programmable
environment