You are on page 1of 5

San Pablo Diocesan Catholic Schools System

Diocese of San Pablo


Liceo de San Pablo
San Pablo City
F.Y. 2020 – 2021

LEARNING MODULE

ICT 10
QUARTER 2
Week 1

LENARD GALLAJONES
San Pablo Diocesan Catholic Schools System
Diocese of San Pablo
Liceo de San Pablo
San Pablo City
F.Y. 2020 – 2021

LEARNING MODULE IN ICT10

DESCRIPTION:

This learning kit is an innovative tool produced by the SP-DCSS (Liceo de San Pablo) to meet
the standards of the ICT Curriculum. It is designed to introduce Information Communication
Technology as an undertaking subject that prepare students in conducting researches and
investigations.

OBJECTIVE:

The learner demonstrates understanding and appreciation of various applications of


Information Communication Technology in different learning fields
CURRICULUM INFORMATION

Education Type: K to 12
Grade Level: 10
Learning Area: ICT
Intended Users: LEARNERS

LEARNING MATERIAL/MODULE:

Lesson: Basic Programming Constructs


Sources: Youtube.com/google.com/slideshare/dwhiz
Target Dates: Week 6-7
Competency: The learners should be able to:

Identify what a variable, constant, and


literals are.
Use variables, constant, and literals in
creating programs
Identify and assign the correct data
type to a variable
A Student's Prayer
Dear Lord,
Help me to be the best student I can be.
Help to study well and to study often,
Especially when I don't feel like studying at all. Help me to be honest when I'm tempted to cheat. Help me to listen to my
teachers and my coaches.
Help me to play fair and to play safely.
Help me to be kind to everyone at school
and especially to those whom others treat unkindly.
Help me to treat others as I would like them to treat me.
Help me to be a good friend to others.
Help me to help others who need my help.
Help me to do the best work I can do.
Help me to use all the gifts you have given me.
Help me to love and respect my parents.
Help me to trust in you, Lord, and in your love for me.
Help me, Lord, I need you!
Amen

The three basic programming constructs


 sequence is the order in which instructions occur and are processed.
 selection determines which path a program takes when it is running.
 iteration is the repeated execution of a section of code when a program is running.

What is a Variable?
A variable is a programmer-defined word that holds the value of the user. It also saves a portion of the
memory to store a determined value. Since variables are programmer-defined words, there are rules to follow in
declaring them in a program.
Rules in Declaring variables:
 it must begin with a letter or underscore, then followed by a letter, digit or underscore.
 It must not include blanks
 It must not be the keywords, which are reserved words by the language.
 It must not be a given name with the same name as other functions
What is a Constant?
A constant is an expression with a fixed value that cannot be changed at runtime. Unlike a variable, the
value can be changed during runtime based on user’s input. To declare a constant in C#, the const keyword is
used.
To define a constant, this syntax should be followed:
Const<data_type><constant_name>=value;
Const short a = 10;
In const short a = 10; declaration, a is declared as a constant with a fixed value of 10. The fixed values
are also called literals. Literals will be thoroughly discussed in the succeeding topics.
There are character constants in C# that when a preceded by the backslash (/) symbol have special
meanings. Some are used to format the result as they appear in the computer screen
Description Escape Code
New line \n
Carriage return \r
Horizontal tab \t
Vertical tab \v
Backspace \b
Form feed (page feed) \f
Alert (Beep) \a
Single quote (‘) \’
Double quote (“) \”
Question mark (?) \?
Backslash (\) \\

What are literals?


Literals are used as particular values within the source code of a program. For example: a=5; 5 in this
piece of code is a literal constant. Literal constants can be integer numerals, floating point numerals, characters,
string, or Boolean values
1. Integer Literals are constant and are also called decimal numbers.
Ex.
235
241
15
29
2. Floating-point literals are numbers with decimals, fractions, and/or exponents
3.14159//3.14159
6.02e23// 6.02 x 10^23

3. Character and string literals are non-numeric constant like:


‘z’ – character
‘j’ – character
“jasmin” – String
“Hello world” – String
The difference between a character and a string literal is a character represents a single character
constant, while a string is composed of several characters. Also. A character is enclosed with a single quotation
marks (‘) while string is has double quotation marks (“”).
4. Lastly, the Boolean literals can have either a true or false value.
Write V if the variable is valid and IV if not.
___________1. Jasmin Almarinez
___________2.1st
___________3. First
___________4. Cin
___________5. Abc
___________6. person
___________7. One
___________8. _jasmin
___________9. @almarinez
___________10. Jasmine_

You might also like