Grade-10-W1_Q2

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

Romans 12:9

“Love should be shown


BIBLE without pretending. Hate
VERSE: evil, and hold on to what is
good.”
Basic Programming
Constructs

1:45 PM
ARRANGE THE
LETTERS OF
THE
FOLLOWING OLESO
WORDS:
NC
Guess the
commands and
identify where
language it
belongs
ITWER
Guess the
commands and
identify where
language it
belongs IREWTN
ELI
Guess the
commands and
identify where
language it
belongs DAERIN
EL
LEARNING TARGETS:
1. I can describe what a console is.
2. I can identify and use the input/output
statements.
3. I can differentiate variables, constraints, and
literals.
CONSOLE
A console is a window which users can interact
within a system program.
This HTML document can be read by a
browser.

YPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARK
LANGUAGE |
C# INPUT/OUTPUT
STATEMENTS
The I/O statements is used for
user and computer interaction.

YPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARK
LANGUAGE |
C# INPUT/OUTPUT
STATEMENTS
It uses the standard input stream to get input
from the user, print information on the
standard output stream, and provide error
messages using the standard error stream
Console.Error.

YPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARK
LANGUAGE |
INPUT/OUTPUT

Console.Write Console.WriteLine Console.ReadLine


Console.Write/WriteLine is a
Console.Write
method that can print all
and Console.WriteLine basic types (string, numeric,
and primitive types).
Console.Write and
Console.WriteLine are basically
Console.Write the same except for
and Console.WriteLine
Console.WriteLine, the cursor
goes to the next line after
displaying the output.
Console.Write
Console.WriteLine
Concatenation means
combining two strings and
return as a result of a new
String
Concatenation string.

C# uses the ‘+’ operator to


concatenate two strings.
String Concatenation
Mixed String Concatenation
The age variable is declared as an int
data type which is a whole number
and has a value of 26, while the text
Mixed String variable with a string data type and
Concatenation string value of “He is” was
concatenated with the variable age
followed by the string text “years
old”.
INPUT/OUTPUT

Console.Write Console.WriteLine Console.ReadLine


Console.Read/Readline() is a
method that can read all the
Console.ReadLine
basic types: string, numeric,
and primitive.
Console.ReadLine
By using the
System.Console.ReadLine(), the user
is asked to enter a value from the
keyboard that will be stored in the
Console.ReadLine
memory using a variable name
firstname with a string data type. Same
with the lastname variable.
Then with the use of
Console.WriteLine, the string “Hello”,
Console.ReadLine is concatenated by the values of the
firstname and lastname variables.
Console.ReadLine
Here is another example of the
Console.Readline with numbers. The code
below uses an integer to accept input and
perform mathematical operations.

YPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARKUP LANGUAGE | HYPERTEXT MARK
LANGUAGE |
Console.ReadLine
Console.ReadLine
ACTIVITIES

DEEPER DEEPEN DO/ EVALUATION


Identify the input/output statements Explain the following concepts in Create a program that will ask the user to
being described in each number. your own words. enter the company’s name, address,
Choose the letter of the correct Variables, Constants,and Literals phone number, email address, and
answer. website address.
Instruction:
Identify the
input/output
statements being
described in each
number. Choose
the letter of the
correct answer.
Instruction: Create a program that will
ask the user to enter the company’s
name, address, phone number, email
address, and website address. Print the
DO/ information on the console window.
EVALUATION Use variables, constants or literals and
assign the correct data type.
Thank you!
Assignment: Research about different value data types.

You might also like