SlideShare a Scribd company logo
PESENSENTATION ON QBASIC
By-SHUBHAM GUPTA
CLASS-6th A
ROOL NO. -27
You've probably used computers to play games, and to write
reports for school. It's a lot more fun to create your own
games to play on the computer. This book will help you get
started by using QBASIC. QBASIC is a programming
language. With a programming language you can tell the
computer what you want it to do. It's a lot like giving
someone directions to your house. The computer follows each
step and does exactly what you tell it. By programming the
computer you can solve math problems, create art or music,
and even make new games. It's all up to you.
The best way to start with this book is to type in some of
the small programs you'll find in each of the chapters. You
might need to work through Chapter 1 first. An adult can
help you get up to speed quickly. Then change the programs
to do what you want them to do. Before long, you'll be
writing your own programs.
BASIC is a programming language used for beginners.
It is very easy ad simple to understand .
BASIC stands for Beginners All Purpose Symbolic
Instruction Code. it was developed in Dartmouth
college, New Hampshire, USA by professor John G .
Kemeny and Thomas E. Kurtz in may 1964.
The main components of the given qbasic program
are:-
COMMENTS: Any text written after REN is
treated as a comments as you wish.
PROGRAM BODY: It contains the programming
statements which cause the action to be taken.
•Let us write our first and very simple QBASIC program.
•Double click on the QBASIC icon on the Desktop to start
QBASIC.
•The QBASIC window will appear with Welcome dialog box.
•Press the Esc key to hide the Welcome dialog box.
•The first window of QBASIC appears.
•Type the program, as shown in the above picture.
•QBASIC executes the program line-by-line. If it
finds any error, it displays the error message and stops
execution.
1. Click on FILE menu and select SAVE AS option .
2. Give a meaningful name to your program in the file name:
text box and press ENTER key.
3. Your file will be saved with the name given by you and
with extension .BAS will be added to automatically .
4. The file name should not exceed more then 8 characters.
RUN A PROGRAM
There are many ways to run a program in QBASIC:-
•By pressing F5 key.
•By selecting RUN menu and then click on start option .
•By typing RUN in the immediate mode and pressing ENTER
key.
A character set is a set of symbols that can be used in
programming language . BASIC uses the followings
symbols as its character set :-
1. ALPHABET-> A,B,C,D…………………Z
a,b,c,d………………….z
2. NUMBERS-> 1,2,3,4,5,6,7,8,9,0
3. SPESIAL CRAACTER-> !,@,#,$,%,^,&,*,(,),_,+,},{, etc.
CONSTANTS- The value which do not change during the
execution of program is called constant . Constants are of
two types:
1. NUMRIC CONSTANTS – Any numeric value ,an integer or
real numbers ,positive or negative numbers is called a
numeric constant .For Example 224,+12,-85 etc.
2. ALPHANUMRIC CONSTANTS- A set of characters is
called a STRING. An alphanumeric or string constant
consists of a sequence of characters ,A-Z, a-z,0-9 and
certain special symbols like %^&*( );:” ‘/.For example
“RAGHAV” ,”SUM =Rs84’,”94”.
A variable is a location in a memory to which any value can be assigned .
1. NUMERIC VARIABLE: It can contain only numeric values .It
represented by an alphabet or an alphabetfollowed by an
another aialphabet or a digit. It should not contain any space
or symbols like ^,?,,/, @ etc. Underscore can be used
whenever a space is required. For example A, C, A2, ABC etc.
represent numeric variables.
2. ALPHANUMERIC OR STRING VARIABLE : A string variable
is represented by an alphabet followed by dollar ($) singn. For
example A1$, RKL$ etc.
1. ARITHMETIC OPERATORS :
OPRETOR EXPLANATION EXAMPLE RESULT(SP
OSE A= 8, B=4)
+ To add 2 or more
numbers
Sum = a+ b 12
- To subtract two or
more numbers
Sub = a - b 4
* To multiply two or
more numbers
Mul = a*b 32
/ To divide two or
more numbers
Div = a / b 2
^ To calculate
Exponentiation
value
Exp = a ^ b 512
2. RELATIONAL OEPRATORS:
OPRETORS MEANING EXAMPLE RESULT(SP
OSE A=10,B=8)
= A = B FALSE
<> A<>B TRUE
> A>B TRUE
< A<B FALSE
>= A>=B TRUE
<= A<=B FALSE
3. LOGICAL OPERATORS : Logical operators are used to
perform logical opertion on numerical values. Logical operators
are used to combine two or more relational expressions and
return a single value as TRUE or FALSE in a decision. The
common logical operations are : AND, OR, NOT.
•Hierarchy defines the order in which the operators are
executed in any Basic expression. The full form of
BEDMAS is:-
B BRACETS ()
E Exponentiation ^
D DIVISION /
M MULTIPLICATION *
A ADDITION +
S SUBTRACTION -
The assignment statement or
Let statement, is used to assign
a value to a variable. In
QBASIC, using Let statement
and line numbers are optional.
CLS
THIS COMMAD IS USED TO
CLER SCREEN
PRINT COMMAND
•The print command is used to display any message or value.
• The print command is used to display any message or value.
• The print command is used with different variations to print
the output in different forms.
• Print using semicolon is used to print the values one after
another, without any space in between.
• This allows the printing of values one after another with plenty
of spaces in between. Only five values can be printed in one line.
In case of more than five values, the remaining values will be
printed on the next line.
• The TAB function is used to move the print position to the
column indicated in its argument. This statement is quite suitable
for printing tabular type of results. PRINT TAB statement can
be used in controlling column location.
• If you want to leave blank line in between while printing an
output, use PRINT statement in the following way.
INPUT STATEMENT
The INPUT statement in QBASIC, accepts the data item
from the user. This statement asks the user to make data
entry while the program is being executed.
While using INPUT statement, the computer does the
following things:
• It stops further processing of the program
• It prints a question mark on the screen.
• It waits for the user to key in its response and press
Enter key.
•It stores or assigns the same data item in to the
corresponding variable mentioned in the INPUT statement.

More Related Content

What's hot

New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
Jamshid Hashimi
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
Satveer Mann
 
Basic html structure
Basic html structureBasic html structure
Basic html structure
Jhaun Paul Enriquez
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
Aryan Ajmer
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
Biswadip Goswami
 
Algorithm
AlgorithmAlgorithm
Algorithm
IHTISHAM UL HAQ
 
Mathematics Function in C ,ppt
Mathematics Function in C ,pptMathematics Function in C ,ppt
Mathematics Function in C ,ppt
AllNewTeach
 
Programming Terminology
Programming TerminologyProgramming Terminology
Programming Terminology
Michael Henson
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Ameer Khan
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Nitin Bhide
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
uniprint
 
Html presentation
Html presentationHtml presentation
Html presentation
Amber Bhaumik
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
agorolabs
 
C language unit-1
C language unit-1C language unit-1
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
Neeru Mittal
 
Coding vs programming
Coding vs programmingCoding vs programming
Coding vs programming
Aman Kumar
 

What's hot (20)

New Elements & Features in CSS3
New Elements & Features in CSS3New Elements & Features in CSS3
New Elements & Features in CSS3
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
 
Basic html structure
Basic html structureBasic html structure
Basic html structure
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Mathematics Function in C ,ppt
Mathematics Function in C ,pptMathematics Function in C ,ppt
Mathematics Function in C ,ppt
 
Programming Terminology
Programming TerminologyProgramming Terminology
Programming Terminology
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Coding vs programming
Coding vs programmingCoding vs programming
Coding vs programming
 

Viewers also liked

Qbasic Tutorial
Qbasic TutorialQbasic Tutorial
Qbasic Tutorial
Joy Hilary Yambao
 
Introduction to qbasic
Introduction to qbasicIntroduction to qbasic
Introduction to qbasic
Richa Karthikeyan
 
QBASIC
QBASICQBASIC
QBASIC
nivi88
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
Gifty Belle Manaois
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
Enelrah Vanna Dela Cruz
 
Qbasic program
Qbasic programQbasic program
Qbasic program
Fercie Caseria
 

Viewers also liked (6)

Qbasic Tutorial
Qbasic TutorialQbasic Tutorial
Qbasic Tutorial
 
Introduction to qbasic
Introduction to qbasicIntroduction to qbasic
Introduction to qbasic
 
QBASIC
QBASICQBASIC
QBASIC
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
Qbasic program
Qbasic programQbasic program
Qbasic program
 

Similar to Qbasic

Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
NasirRohail1
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz
Shahbaz Ahmad
 
Computer programming k 12
Computer programming k 12Computer programming k 12
Computer programming k 12
lemonmichelangelo
 
Qbasic
QbasicQbasic
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
Gifty Belle Manaois
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
Allen de Castro
 
02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx
arifaqazi2
 
Qbesic programming class 9
Qbesic programming class 9Qbesic programming class 9
Qbesic programming class 9
bhuwanbist1
 
Q basic ch
Q basic chQ basic ch
Q basic ch
ssuser39dff5
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
AdrianVANTOPINA
 
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
 
Computer science 3rd Term Notes
Computer science 3rd Term NotesComputer science 3rd Term Notes
Computer science 3rd Term Notes
JohnBernard46
 
Algorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptxAlgorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptx
KaavyaGaur1
 
Programming
ProgrammingProgramming
Programming
Leo Simon Anfone
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
Wondeson Emeye
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
Niropam Das
 
Input-output
Input-outputInput-output
Input-output
neda marie maramo
 
Computer programming
Computer programmingComputer programming
Computer programming
Vincent Valenzuela
 
Basic of qbasic
Basic of qbasicBasic of qbasic
Basic of qbasic
RoshanMaharjan13
 

Similar to Qbasic (20)

Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
 
10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz10th class computer science notes in english by cstechz
10th class computer science notes in english by cstechz
 
Computer programming k 12
Computer programming k 12Computer programming k 12
Computer programming k 12
 
Qbasic
QbasicQbasic
Qbasic
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx02 Algorithms and flowcharts - computers.pptx
02 Algorithms and flowcharts - computers.pptx
 
Qbesic programming class 9
Qbesic programming class 9Qbesic programming class 9
Qbesic programming class 9
 
Q basic ch
Q basic chQ basic ch
Q basic ch
 
programming.ppt
programming.pptprogramming.ppt
programming.ppt
 
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
 
Computer science 3rd Term Notes
Computer science 3rd Term NotesComputer science 3rd Term Notes
Computer science 3rd Term Notes
 
Algorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptxAlgorithm Design and Problem Solving [Autosaved].pptx
Algorithm Design and Problem Solving [Autosaved].pptx
 
Programming
ProgrammingProgramming
Programming
 
Microprocessor chapter 9 - assembly language programming
Microprocessor  chapter 9 - assembly language programmingMicroprocessor  chapter 9 - assembly language programming
Microprocessor chapter 9 - assembly language programming
 
Assembly Language Programming
Assembly Language ProgrammingAssembly Language Programming
Assembly Language Programming
 
Input-output
Input-outputInput-output
Input-output
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Basic of qbasic
Basic of qbasicBasic of qbasic
Basic of qbasic
 

More from Shubham Gupta

Stone age
Stone ageStone age
Stone age
Shubham Gupta
 
Robert frost
Robert frostRobert frost
Robert frost
Shubham Gupta
 
Presentation of eye ths
Presentation of eye thsPresentation of eye ths
Presentation of eye ths
Shubham Gupta
 
Mahatma gandhi in hindi
Mahatma gandhi in hindiMahatma gandhi in hindi
Mahatma gandhi in hindiShubham Gupta
 
dowry like evils
dowry like evilsdowry like evils
dowry like evils
Shubham Gupta
 
Gender inequality
Gender inequalityGender inequality
Gender inequality
Shubham Gupta
 
Com ppt shubham
Com ppt shubhamCom ppt shubham
Com ppt shubham
Shubham Gupta
 
The diversity of india
The diversity of indiaThe diversity of india
The diversity of india
Shubham Gupta
 
Gender inequality
Gender inequalityGender inequality
Gender inequality
Shubham Gupta
 
pollution
pollutionpollution
pollution
Shubham Gupta
 
computer memory
computer memorycomputer memory
computer memory
Shubham Gupta
 
Robert frost
Robert frostRobert frost
Robert frost
Shubham Gupta
 
Presentation on eye
Presentation on eyePresentation on eye
Presentation on eye
Shubham Gupta
 

More from Shubham Gupta (13)

Stone age
Stone ageStone age
Stone age
 
Robert frost
Robert frostRobert frost
Robert frost
 
Presentation of eye ths
Presentation of eye thsPresentation of eye ths
Presentation of eye ths
 
Mahatma gandhi in hindi
Mahatma gandhi in hindiMahatma gandhi in hindi
Mahatma gandhi in hindi
 
dowry like evils
dowry like evilsdowry like evils
dowry like evils
 
Gender inequality
Gender inequalityGender inequality
Gender inequality
 
Com ppt shubham
Com ppt shubhamCom ppt shubham
Com ppt shubham
 
The diversity of india
The diversity of indiaThe diversity of india
The diversity of india
 
Gender inequality
Gender inequalityGender inequality
Gender inequality
 
pollution
pollutionpollution
pollution
 
computer memory
computer memorycomputer memory
computer memory
 
Robert frost
Robert frostRobert frost
Robert frost
 
Presentation on eye
Presentation on eyePresentation on eye
Presentation on eye
 

Recently uploaded

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 

Recently uploaded (20)

বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 

Qbasic

  • 1. PESENSENTATION ON QBASIC By-SHUBHAM GUPTA CLASS-6th A ROOL NO. -27
  • 2. You've probably used computers to play games, and to write reports for school. It's a lot more fun to create your own games to play on the computer. This book will help you get started by using QBASIC. QBASIC is a programming language. With a programming language you can tell the computer what you want it to do. It's a lot like giving someone directions to your house. The computer follows each step and does exactly what you tell it. By programming the computer you can solve math problems, create art or music, and even make new games. It's all up to you. The best way to start with this book is to type in some of the small programs you'll find in each of the chapters. You might need to work through Chapter 1 first. An adult can help you get up to speed quickly. Then change the programs to do what you want them to do. Before long, you'll be writing your own programs.
  • 3. BASIC is a programming language used for beginners. It is very easy ad simple to understand . BASIC stands for Beginners All Purpose Symbolic Instruction Code. it was developed in Dartmouth college, New Hampshire, USA by professor John G . Kemeny and Thomas E. Kurtz in may 1964.
  • 4. The main components of the given qbasic program are:- COMMENTS: Any text written after REN is treated as a comments as you wish. PROGRAM BODY: It contains the programming statements which cause the action to be taken.
  • 5. •Let us write our first and very simple QBASIC program. •Double click on the QBASIC icon on the Desktop to start QBASIC. •The QBASIC window will appear with Welcome dialog box. •Press the Esc key to hide the Welcome dialog box. •The first window of QBASIC appears. •Type the program, as shown in the above picture. •QBASIC executes the program line-by-line. If it finds any error, it displays the error message and stops execution.
  • 6. 1. Click on FILE menu and select SAVE AS option . 2. Give a meaningful name to your program in the file name: text box and press ENTER key. 3. Your file will be saved with the name given by you and with extension .BAS will be added to automatically . 4. The file name should not exceed more then 8 characters.
  • 7. RUN A PROGRAM There are many ways to run a program in QBASIC:- •By pressing F5 key. •By selecting RUN menu and then click on start option . •By typing RUN in the immediate mode and pressing ENTER key.
  • 8. A character set is a set of symbols that can be used in programming language . BASIC uses the followings symbols as its character set :- 1. ALPHABET-> A,B,C,D…………………Z a,b,c,d………………….z 2. NUMBERS-> 1,2,3,4,5,6,7,8,9,0 3. SPESIAL CRAACTER-> !,@,#,$,%,^,&,*,(,),_,+,},{, etc.
  • 9. CONSTANTS- The value which do not change during the execution of program is called constant . Constants are of two types: 1. NUMRIC CONSTANTS – Any numeric value ,an integer or real numbers ,positive or negative numbers is called a numeric constant .For Example 224,+12,-85 etc. 2. ALPHANUMRIC CONSTANTS- A set of characters is called a STRING. An alphanumeric or string constant consists of a sequence of characters ,A-Z, a-z,0-9 and certain special symbols like %^&*( );:” ‘/.For example “RAGHAV” ,”SUM =Rs84’,”94”.
  • 10. A variable is a location in a memory to which any value can be assigned . 1. NUMERIC VARIABLE: It can contain only numeric values .It represented by an alphabet or an alphabetfollowed by an another aialphabet or a digit. It should not contain any space or symbols like ^,?,,/, @ etc. Underscore can be used whenever a space is required. For example A, C, A2, ABC etc. represent numeric variables. 2. ALPHANUMERIC OR STRING VARIABLE : A string variable is represented by an alphabet followed by dollar ($) singn. For example A1$, RKL$ etc.
  • 11. 1. ARITHMETIC OPERATORS : OPRETOR EXPLANATION EXAMPLE RESULT(SP OSE A= 8, B=4) + To add 2 or more numbers Sum = a+ b 12 - To subtract two or more numbers Sub = a - b 4 * To multiply two or more numbers Mul = a*b 32 / To divide two or more numbers Div = a / b 2 ^ To calculate Exponentiation value Exp = a ^ b 512
  • 12. 2. RELATIONAL OEPRATORS: OPRETORS MEANING EXAMPLE RESULT(SP OSE A=10,B=8) = A = B FALSE <> A<>B TRUE > A>B TRUE < A<B FALSE >= A>=B TRUE <= A<=B FALSE
  • 13. 3. LOGICAL OPERATORS : Logical operators are used to perform logical opertion on numerical values. Logical operators are used to combine two or more relational expressions and return a single value as TRUE or FALSE in a decision. The common logical operations are : AND, OR, NOT. •Hierarchy defines the order in which the operators are executed in any Basic expression. The full form of BEDMAS is:-
  • 14. B BRACETS () E Exponentiation ^ D DIVISION / M MULTIPLICATION * A ADDITION + S SUBTRACTION - The assignment statement or Let statement, is used to assign a value to a variable. In QBASIC, using Let statement and line numbers are optional. CLS THIS COMMAD IS USED TO CLER SCREEN
  • 15. PRINT COMMAND •The print command is used to display any message or value. • The print command is used to display any message or value. • The print command is used with different variations to print the output in different forms. • Print using semicolon is used to print the values one after another, without any space in between. • This allows the printing of values one after another with plenty of spaces in between. Only five values can be printed in one line. In case of more than five values, the remaining values will be printed on the next line. • The TAB function is used to move the print position to the column indicated in its argument. This statement is quite suitable for printing tabular type of results. PRINT TAB statement can be used in controlling column location. • If you want to leave blank line in between while printing an output, use PRINT statement in the following way.
  • 16. INPUT STATEMENT The INPUT statement in QBASIC, accepts the data item from the user. This statement asks the user to make data entry while the program is being executed. While using INPUT statement, the computer does the following things: • It stops further processing of the program • It prints a question mark on the screen. • It waits for the user to key in its response and press Enter key. •It stores or assigns the same data item in to the corresponding variable mentioned in the INPUT statement.