SlideShare a Scribd company logo
QBASIC:
A TOOL FOR MODERN
PROGRAMMING
BY REDEN R. PATACSIL AND GIFTY BELLE MANAOIS
Beginner’s All Purpose Symbolic
Instruction Code (BASIC)
 is an interpreter which means it reads every line, translate it and lets the
computer execute it before reading another.
 Each instruction starts with a line number.
RULES IN USING QBASIC
 Statements to be made should be in proper sequence.
 Each statement should have one BASIC command which are called
keywords.
 QBASIC has standard rules which are called Syntax.
QBASIC Data
 CONSTANT- data whose values does not change or remains fixed.
 NUMERIC CONSTANT – numbers used for mathematical calculations.
 ALPHANUMERIC CONSTANT – number or alphabets in double quotes.
 VARIABLE – data whose values change depending on calculations
executed by the program.
 NUMERIC VARIABLE – variable that holds numeric constant.
 ALPHANUMERIC VARIABLE – number or alphabets in double quotes.
 CLS – used to clear the screen.
 PRINT – used to display the output on the screen.
 REM – stands for REMARK. It gives an explanation of the program thereby
making the program more understandable.
 LET – assigns a value to a variable in a program.
 END – it is usually given at the end of the program.
 INPUT – allows users to enter values for a variable while running a program.
 DELETE <LINE NO.> - delete a line number in a program
 RUN – used to execute the program and get the output on the screen.
 NEW – used to totally write a new program.
 SYSTEM – used to exit the QBASIC program.
QBASIC Commands
PRINT Command
 The PRINT command tells QBASIC to print something to the screen.
 With the PRINT command, we can print numbers and letters to the screen.
EXAMPLE:
PRINT Command
 If you pass an expression to the PRINT command, the value returned is printed.
EXAMPLE:
 If you enclose the expression with quotation marks, the expression becomes a string
and is not evaluated.
EXAMPLE:
PRINT Command
 To place World onto
the previous line, place
a semi-colon after Print
“Hello”.
 If you put a comma instead
of a semi-colon on the first
line, the program will insert
spaces between two words.
Variables
 A variable is a piece of data kept in the computer’s memory.
 A variable is assigned to a letter(s) in the following way:
INPUT Command
INPUT- allows the user to enter either a string or a number,
which is then stored in a variable.
 If semi-colon (;) is used, the output will display a question mark (?).
If a comma (,) is used, the output will display blank or nothing.
INPUT+PRINT Command
 The INPUT and the PRINT command can be used to
utilize the variable in the INPUT command in
computations in the PRINT command.
IF & THEN Command
 The IF and THEN commands are used to
compare an expression and then perform
some task based on that expression.
IF & THEN Command
EXPRESSION SIGNS
 You can also enter the following statements, instead of the
equal sign:
IF & THEN Command
EXPRESSION SIGNS
 We can also combine signs.
ELSE Command
 Using the ELSE command, you can have the
program perform a different action if the
statement is false.
EXAMPLE:
The following program uses ELSE with the END IF command:
ELSE Command
ELSE IF Command
The ELSE IF command allows you to perform a
secondary action if the first expression was false. Unlike ELSE,
this task is only performed if a specified statement is true.
 You can have multiple ELSEIF commands, along with ELSE.
ELSE IF Command
MULTIPLE EXPRESSIONS
 You can have more
than one expression in
IF… THEN by using either
the OR operator or the
AND operator.
 The OR operator only
requires one expression to
be true in order to print
“Yes” in the following
program:
 The AND operator requires
both expressions to be
true.
THANK YOU!
REDEN R. PATACSIL
&
GIFTY BELLE MANAOIS

More Related Content

What's hot

5 diapositivas del cpu con tranciciones
5 diapositivas del cpu con tranciciones5 diapositivas del cpu con tranciciones
5 diapositivas del cpu con tranciciones
Josueman1245
 
Qbasic
QbasicQbasic
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
Enelrah Vanna Dela Cruz
 
Software, clasificacion y tipos
Software, clasificacion y tiposSoftware, clasificacion y tipos
Software, clasificacion y tipos
Sandra Mendoza
 
SYSTEM SOFTWARE
SYSTEM SOFTWARESYSTEM SOFTWARE
SYSTEM SOFTWARE
Swarnima Tiwari
 
Analogía entre el computador y el cuerpo humano
Analogía entre el computador y el cuerpo humanoAnalogía entre el computador y el cuerpo humano
Analogía entre el computador y el cuerpo humano
Marcelayesteban
 
Qbasic program
Qbasic programQbasic program
Qbasic program
Fercie Caseria
 
Eclipse Iceoryx Overview
Eclipse Iceoryx OverviewEclipse Iceoryx Overview
Eclipse Iceoryx Overview
Tomoya Fujita
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
NasirRohail1
 
Computer Languages.
Computer Languages.Computer Languages.
Computer Languages.
Aditya Sheoran
 
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
DataWorks Summit
 
La programación
La programaciónLa programación
La programación
93427625
 
Qbasic introduction
Qbasic introductionQbasic introduction
Qbasic introduction
Christian Joseph Opiana
 
Google borg と コンテナベース分散システムデザインパターン
Google borg と コンテナベース分散システムデザインパターンGoogle borg と コンテナベース分散システムデザインパターン
Google borg と コンテナベース分散システムデザインパターン
ktateish
 
Qbasic
QbasicQbasic
Qbasic
yousufvali
 
Editores de Texto Informatica
Editores de Texto InformaticaEditores de Texto Informatica
Editores de Texto Informatica
Luisquintal22
 
明日から使えるPostgre sql運用管理テクニック(監視編)
明日から使えるPostgre sql運用管理テクニック(監視編)明日から使えるPostgre sql運用管理テクニック(監視編)
明日から使えるPostgre sql運用管理テクニック(監視編)kasaharatt
 
Tipos de computadoras.diapositivas.
Tipos de computadoras.diapositivas.Tipos de computadoras.diapositivas.
Tipos de computadoras.diapositivas.
mariapilarmorcillo
 
DevOpsにおけるAnsibleの立ち位置と使い所
DevOpsにおけるAnsibleの立ち位置と使い所DevOpsにおけるAnsibleの立ち位置と使い所
DevOpsにおけるAnsibleの立ち位置と使い所
Hidetoshi Hirokawa
 
c vs java (2).pptx
c vs java (2).pptxc vs java (2).pptx
c vs java (2).pptx
AmitSingh770691
 

What's hot (20)

5 diapositivas del cpu con tranciciones
5 diapositivas del cpu con tranciciones5 diapositivas del cpu con tranciciones
5 diapositivas del cpu con tranciciones
 
Qbasic
QbasicQbasic
Qbasic
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
Software, clasificacion y tipos
Software, clasificacion y tiposSoftware, clasificacion y tipos
Software, clasificacion y tipos
 
SYSTEM SOFTWARE
SYSTEM SOFTWARESYSTEM SOFTWARE
SYSTEM SOFTWARE
 
Analogía entre el computador y el cuerpo humano
Analogía entre el computador y el cuerpo humanoAnalogía entre el computador y el cuerpo humano
Analogía entre el computador y el cuerpo humano
 
Qbasic program
Qbasic programQbasic program
Qbasic program
 
Eclipse Iceoryx Overview
Eclipse Iceoryx OverviewEclipse Iceoryx Overview
Eclipse Iceoryx Overview
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
 
Computer Languages.
Computer Languages.Computer Languages.
Computer Languages.
 
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
Worldwide Scalable and Resilient Messaging Services by CQRS and Event Sourcin...
 
La programación
La programaciónLa programación
La programación
 
Qbasic introduction
Qbasic introductionQbasic introduction
Qbasic introduction
 
Google borg と コンテナベース分散システムデザインパターン
Google borg と コンテナベース分散システムデザインパターンGoogle borg と コンテナベース分散システムデザインパターン
Google borg と コンテナベース分散システムデザインパターン
 
Qbasic
QbasicQbasic
Qbasic
 
Editores de Texto Informatica
Editores de Texto InformaticaEditores de Texto Informatica
Editores de Texto Informatica
 
明日から使えるPostgre sql運用管理テクニック(監視編)
明日から使えるPostgre sql運用管理テクニック(監視編)明日から使えるPostgre sql運用管理テクニック(監視編)
明日から使えるPostgre sql運用管理テクニック(監視編)
 
Tipos de computadoras.diapositivas.
Tipos de computadoras.diapositivas.Tipos de computadoras.diapositivas.
Tipos de computadoras.diapositivas.
 
DevOpsにおけるAnsibleの立ち位置と使い所
DevOpsにおけるAnsibleの立ち位置と使い所DevOpsにおけるAnsibleの立ち位置と使い所
DevOpsにおけるAnsibleの立ち位置と使い所
 
c vs java (2).pptx
c vs java (2).pptxc vs java (2).pptx
c vs java (2).pptx
 

Similar to QBASIC: A Tool For Modern Programming

Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
jovelleluzon
 
Computer programming k 12
Computer programming k 12Computer programming k 12
Computer programming k 12
lemonmichelangelo
 
Basic computer-programming-2
Basic computer-programming-2Basic computer-programming-2
Basic computer-programming-2
lemonmichelangelo
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
Allen de Castro
 
Input-output
Input-outputInput-output
Input-output
neda marie maramo
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
livecoding.tv
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
AdrianVANTOPINA
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Elizabeth de Leon Aler
 
Q basic ch
Q basic chQ basic ch
Q basic ch
ssuser39dff5
 
Basic programming
Basic programmingBasic programming
Basic programming
Nicole Danielle Mallari
 
C programming
C programmingC programming
C programming
saniabhalla
 
C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICSC++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
Aami Kakakhel
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
Babatunde Salaam
 
Programming
ProgrammingProgramming
Programming
Leo Simon Anfone
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng ver
Qrembiezs Intruder
 
Pascal programming lecture notes
Pascal programming lecture notesPascal programming lecture notes
Pascal programming lecture notes
Alejandro Domínguez Torres
 
Algorithm and psuedocode
Algorithm and psuedocodeAlgorithm and psuedocode
Algorithm and psuedocode
Mustafa Qureshi
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
Niropam Das
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Mohammed Saleh
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
Mohammed Saleh
 

Similar to QBASIC: A Tool For Modern Programming (20)

Qbasic tutorial
Qbasic tutorialQbasic tutorial
Qbasic tutorial
 
Computer programming k 12
Computer programming k 12Computer programming k 12
Computer programming k 12
 
Basic computer-programming-2
Basic computer-programming-2Basic computer-programming-2
Basic computer-programming-2
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Input-output
Input-outputInput-output
Input-output
 
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Q basic ch
Q basic chQ basic ch
Q basic ch
 
Basic programming
Basic programmingBasic programming
Basic programming
 
C programming
C programmingC programming
C programming
 
C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICSC++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
 
Project two c++ tutorial
Project two c++ tutorialProject two c++ tutorial
Project two c++ tutorial
 
Programming
ProgrammingProgramming
Programming
 
Tutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng verTutorial basic of c ++lesson 1 eng ver
Tutorial basic of c ++lesson 1 eng ver
 
Pascal programming lecture notes
Pascal programming lecture notesPascal programming lecture notes
Pascal programming lecture notes
 
Algorithm and psuedocode
Algorithm and psuedocodeAlgorithm and psuedocode
Algorithm and psuedocode
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

Recently uploaded

Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Envertis Software Solutions
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 

Recently uploaded (20)

Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative AnalysisOdoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
Odoo ERP Vs. Traditional ERP Systems – A Comparative Analysis
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 

QBASIC: A Tool For Modern Programming

  • 1. QBASIC: A TOOL FOR MODERN PROGRAMMING BY REDEN R. PATACSIL AND GIFTY BELLE MANAOIS
  • 2. Beginner’s All Purpose Symbolic Instruction Code (BASIC)  is an interpreter which means it reads every line, translate it and lets the computer execute it before reading another.  Each instruction starts with a line number. RULES IN USING QBASIC  Statements to be made should be in proper sequence.  Each statement should have one BASIC command which are called keywords.  QBASIC has standard rules which are called Syntax.
  • 3. QBASIC Data  CONSTANT- data whose values does not change or remains fixed.  NUMERIC CONSTANT – numbers used for mathematical calculations.  ALPHANUMERIC CONSTANT – number or alphabets in double quotes.  VARIABLE – data whose values change depending on calculations executed by the program.  NUMERIC VARIABLE – variable that holds numeric constant.  ALPHANUMERIC VARIABLE – number or alphabets in double quotes.
  • 4.  CLS – used to clear the screen.  PRINT – used to display the output on the screen.  REM – stands for REMARK. It gives an explanation of the program thereby making the program more understandable.  LET – assigns a value to a variable in a program.  END – it is usually given at the end of the program.  INPUT – allows users to enter values for a variable while running a program.  DELETE <LINE NO.> - delete a line number in a program  RUN – used to execute the program and get the output on the screen.  NEW – used to totally write a new program.  SYSTEM – used to exit the QBASIC program. QBASIC Commands
  • 5. PRINT Command  The PRINT command tells QBASIC to print something to the screen.  With the PRINT command, we can print numbers and letters to the screen. EXAMPLE:
  • 6. PRINT Command  If you pass an expression to the PRINT command, the value returned is printed. EXAMPLE:  If you enclose the expression with quotation marks, the expression becomes a string and is not evaluated. EXAMPLE:
  • 7. PRINT Command  To place World onto the previous line, place a semi-colon after Print “Hello”.  If you put a comma instead of a semi-colon on the first line, the program will insert spaces between two words.
  • 8. Variables  A variable is a piece of data kept in the computer’s memory.  A variable is assigned to a letter(s) in the following way:
  • 9. INPUT Command INPUT- allows the user to enter either a string or a number, which is then stored in a variable.  If semi-colon (;) is used, the output will display a question mark (?). If a comma (,) is used, the output will display blank or nothing.
  • 10. INPUT+PRINT Command  The INPUT and the PRINT command can be used to utilize the variable in the INPUT command in computations in the PRINT command.
  • 11. IF & THEN Command  The IF and THEN commands are used to compare an expression and then perform some task based on that expression.
  • 12. IF & THEN Command EXPRESSION SIGNS  You can also enter the following statements, instead of the equal sign:
  • 13. IF & THEN Command EXPRESSION SIGNS  We can also combine signs.
  • 14. ELSE Command  Using the ELSE command, you can have the program perform a different action if the statement is false. EXAMPLE:
  • 15. The following program uses ELSE with the END IF command: ELSE Command
  • 16. ELSE IF Command The ELSE IF command allows you to perform a secondary action if the first expression was false. Unlike ELSE, this task is only performed if a specified statement is true.
  • 17.  You can have multiple ELSEIF commands, along with ELSE. ELSE IF Command
  • 18. MULTIPLE EXPRESSIONS  You can have more than one expression in IF… THEN by using either the OR operator or the AND operator.  The OR operator only requires one expression to be true in order to print “Yes” in the following program:  The AND operator requires both expressions to be true.
  • 19. THANK YOU! REDEN R. PATACSIL & GIFTY BELLE MANAOIS