SlideShare a Scribd company logo
COMPUTER
PROGRAMMI
GPREPARED BY:
PAGADUAN, JOANNE A.
VIJUNGCO, ARISA MAE D.
GRADE 9 SSC LAVOISIER
MR. ANGEL CORONA
COMPUTER PROGRAMMING ADVISER
RETRIEVING
KEYBOARD
INPUT FROM
THE USER
INPUT
commandOne way to receive input from the
keyboard is with the INPUT
command.
Allows the user to enter a string or a
number, then stored in a variable.
REMEMBER:
If the program is executed, the INPUT command
displays a question mark, and followed by a
blinking cursor.
TIP:
If you place a string and a semi- colon between
INPUT and the variable, the program will print the
string.
INPUT “Please enter some text:”;
The IF and THEN
command
It is used to compare an expression and the
perform some task based on that expression.
x=3
IF x=3 THEN PRINT “x equals to 3”
Since X does equal 3 in this case, the
program outputs:
X equals to 3
EXPRESSION
Signs< (less than)
> (greater than)
<> (does not equal)
<= (less than or equal)
>= (more than or equal)
NOTE:
Some signs that can be used instead of = (equal)
sign.
ELS
EIt helps the program to perform different action if the
statement is false.
x=8
If x= 7 THEN PRINT “YES” ELSE PRINT “NO”
Since X doesn’t equal to 8, the output is:
NO
END
IFIt helps you to have multiple
commands after the IF… THEN
statement.
They must start on the line after the IF
statement.
END IF should appear right after the list
of commands.
INPUT “Please enter a number”, x
IF x< 6 THEN
PRINT “YES”
ELSE
PRINT “NO”
END IF
Proceed to next slides for
exercises
Test your
skills!
OBJECTI
VES: TO ENHANCE SKILLS IN COMPUTER PROGRAMMING USING THE
WIDELY KNOWN AND ACCEPTED PROGRAMMING LANGUAGE,
QBASIC.
 TO EASILY GRASP THE BASICS OF COMPUTER PROGRAMMING
THROUGH THE USE OF QBASIC.
PROCED
URE: ANSWER THE FOLLOWING EXERCISES THROUGH THE USE OF
QBASIC.
 USE QBASIC FOR COMPUTER PROGRAMMING FOR THE EXERCISES
READIED/MADE BY THE PRESENTERS.
EXERCISE 1:
IF- THEN
PROGRAM
x=143
IF x = 143 THEN PRINT “I LOVE YOU”
PROGRAM
x=333
IF x = 123 THEN PRINT “BLACK”
EXERCISE 2: IF-
THEN ELSE
PROGRAM
x = 100
IF x=90 THEN PRINT “LOL” ELSE PRINT “ULOL”
IF x=143 THEN PRINT “HAH” ELSE PRINT “HUH”
IF x<10 THEN PRINT “OKAY” ELSE PRINT “LANG”
IF x>100 THEN PRINT “WHATEVER” ELSE PRINT “TSK”
IF x<> 99 THEN PRINT “MAGANDA” ELSE PRINT “PANGIT”
EXERCISE 3: IF- THEN-
ELSE- END IF
This is about choosing to do either one thing or another (simple
selection). This is a test in the use of the IF instruction. The If instructions
spans many lines and includes four (4) keywords, IF, THEN, ELSE, END IF.
Create a program that will ask you a number. It will then print
out the word KIND. If the number is greater than 50 or the word RUDE if it
is not.
NOTE*
Two (2) programs for both outputs.
Instructions:
EXERCIS
E 1
PROGRAM
:
OUTPU
T:
The output should be
[ I LOVE YOU ]
since the given data satisfied the condition
PROGRA
M: OUTPU
T:
The output should be just blank since the given data
did not satisfy the condition.
EXERCISE 2
PROGRAM:
OUTP
UT:
EXERCISE 3
PROGRAM:
OUTP
UT:
PRESENTED BY:
PAGADUAN,
JOANNE A.
VIJUNGCO, ARISA
MAE D.
PRESENTED TO:
MR. ANGEL
CORONA
VIJUNGCO, ARISA MAE D.
PAGADUAN, JOANNE A.
END

More Related Content

PPT
Computer programming k 12
PPTX
16#perecentage
PPTX
QBASIC: A Tool For Modern Programming
PPT
Qbasic notes
PPTX
Programming : QBASIC
PPT
Number systems
PPSX
Chapter iii: Number System
PDF
Chapter 01 Planning Computer Program (re-upload)
Computer programming k 12
16#perecentage
QBASIC: A Tool For Modern Programming
Qbasic notes
Programming : QBASIC
Number systems
Chapter iii: Number System
Chapter 01 Planning Computer Program (re-upload)

Similar to COMPUTER PROGRAMMING (20)

PPT
Qbasic introduction
PPTX
Introduction to Programming and QBasic Tutorial
PPTX
Basic computer-programming-2
PPTX
Qbasic tutorial
PPTX
Basic Computer Programming
PPTX
The Knowledge of QBasic
PPTX
QBASIC: A Tool For Modern Programming
PPTX
Algorithms and Flowcharts
PPTX
Pseudocode
PPT
programming.ppt
PPTX
Algorithms-Flowcharts for programming fundamental
PPTX
Algorithmsandflowcharts1
PPTX
Introduction to Python programming
PDF
POLITEKNIK MALAYSIA
PPTX
PPT
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
PPT
Programming algorithms and flowchart.ppt
PPT
01 Algorithms And Flowcharts.ppt
PPT
256958.ppt
PDF
basic of desicion control statement in python
Qbasic introduction
Introduction to Programming and QBasic Tutorial
Basic computer-programming-2
Qbasic tutorial
Basic Computer Programming
The Knowledge of QBasic
QBASIC: A Tool For Modern Programming
Algorithms and Flowcharts
Pseudocode
programming.ppt
Algorithms-Flowcharts for programming fundamental
Algorithmsandflowcharts1
Introduction to Python programming
POLITEKNIK MALAYSIA
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Programming algorithms and flowchart.ppt
01 Algorithms And Flowcharts.ppt
256958.ppt
basic of desicion control statement in python
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Cloud computing and distributed systems.
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
sap open course for s4hana steps from ECC to s4
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Empathic Computing: Creating Shared Understanding
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Dropbox Q2 2025 Financial Results & Investor Presentation
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
Programs and apps: productivity, graphics, security and other tools
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25 Week I
Cloud computing and distributed systems.
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Understanding_Digital_Forensics_Presentation.pptx
sap open course for s4hana steps from ECC to s4
The AUB Centre for AI in Media Proposal.docx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Ad

COMPUTER PROGRAMMING

  • 1. COMPUTER PROGRAMMI GPREPARED BY: PAGADUAN, JOANNE A. VIJUNGCO, ARISA MAE D. GRADE 9 SSC LAVOISIER MR. ANGEL CORONA COMPUTER PROGRAMMING ADVISER
  • 3. INPUT commandOne way to receive input from the keyboard is with the INPUT command. Allows the user to enter a string or a number, then stored in a variable.
  • 4. REMEMBER: If the program is executed, the INPUT command displays a question mark, and followed by a blinking cursor. TIP: If you place a string and a semi- colon between INPUT and the variable, the program will print the string. INPUT “Please enter some text:”;
  • 5. The IF and THEN command It is used to compare an expression and the perform some task based on that expression. x=3 IF x=3 THEN PRINT “x equals to 3” Since X does equal 3 in this case, the program outputs: X equals to 3
  • 6. EXPRESSION Signs< (less than) > (greater than) <> (does not equal) <= (less than or equal) >= (more than or equal) NOTE: Some signs that can be used instead of = (equal) sign.
  • 7. ELS EIt helps the program to perform different action if the statement is false. x=8 If x= 7 THEN PRINT “YES” ELSE PRINT “NO” Since X doesn’t equal to 8, the output is: NO
  • 8. END IFIt helps you to have multiple commands after the IF… THEN statement. They must start on the line after the IF statement. END IF should appear right after the list of commands.
  • 9. INPUT “Please enter a number”, x IF x< 6 THEN PRINT “YES” ELSE PRINT “NO” END IF
  • 10. Proceed to next slides for exercises Test your skills!
  • 11. OBJECTI VES: TO ENHANCE SKILLS IN COMPUTER PROGRAMMING USING THE WIDELY KNOWN AND ACCEPTED PROGRAMMING LANGUAGE, QBASIC.  TO EASILY GRASP THE BASICS OF COMPUTER PROGRAMMING THROUGH THE USE OF QBASIC. PROCED URE: ANSWER THE FOLLOWING EXERCISES THROUGH THE USE OF QBASIC.  USE QBASIC FOR COMPUTER PROGRAMMING FOR THE EXERCISES READIED/MADE BY THE PRESENTERS.
  • 12. EXERCISE 1: IF- THEN PROGRAM x=143 IF x = 143 THEN PRINT “I LOVE YOU” PROGRAM x=333 IF x = 123 THEN PRINT “BLACK”
  • 13. EXERCISE 2: IF- THEN ELSE PROGRAM x = 100 IF x=90 THEN PRINT “LOL” ELSE PRINT “ULOL” IF x=143 THEN PRINT “HAH” ELSE PRINT “HUH” IF x<10 THEN PRINT “OKAY” ELSE PRINT “LANG” IF x>100 THEN PRINT “WHATEVER” ELSE PRINT “TSK” IF x<> 99 THEN PRINT “MAGANDA” ELSE PRINT “PANGIT”
  • 14. EXERCISE 3: IF- THEN- ELSE- END IF This is about choosing to do either one thing or another (simple selection). This is a test in the use of the IF instruction. The If instructions spans many lines and includes four (4) keywords, IF, THEN, ELSE, END IF. Create a program that will ask you a number. It will then print out the word KIND. If the number is greater than 50 or the word RUDE if it is not. NOTE* Two (2) programs for both outputs. Instructions:
  • 15. EXERCIS E 1 PROGRAM : OUTPU T: The output should be [ I LOVE YOU ] since the given data satisfied the condition
  • 16. PROGRA M: OUTPU T: The output should be just blank since the given data did not satisfy the condition.
  • 19. PRESENTED BY: PAGADUAN, JOANNE A. VIJUNGCO, ARISA MAE D. PRESENTED TO: MR. ANGEL CORONA VIJUNGCO, ARISA MAE D. PAGADUAN, JOANNE A.
  • 20. END