SlideShare a Scribd company logo
2
Most read
11
Most read
15
Most read
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

PPTX
Qbasic tutorial
PPTX
PPTX
Computer programming
PPTX
Internet basics
PPTX
Storage devices and media presentation.pptx
PDF
1. Introduction to Computer (CSI-321)
PPTX
Files and Folders in Windows 7
Qbasic tutorial
Computer programming
Internet basics
Storage devices and media presentation.pptx
1. Introduction to Computer (CSI-321)
Files and Folders in Windows 7

What's hot (20)

PPT
Introduction to computer programming
PPTX
Sudoku solver ppt
PPTX
Basic Computer Programming
PPTX
Ms Word 2010 Training In Ambala ! Batra Computer Centre
PPTX
Static dynamic and active web pages
PPT
Introduction To Web Technology
PPTX
Microsoft word ppt presentation
PPTX
Access 2016 module 1 ppt presentation
PPTX
PPTX
Gmail introduction
PDF
The Complete Beginners Guide to Using Canva
PDF
Basic of qbasic
PPTX
Convert Hexadecimal to decimal
PPTX
Email basics
PPTX
Microsoft Word: Working with Tables
PPTX
Graphical User Interface
PPTX
Programming Fundamentals lecture 1
PDF
CAMBRIDGE IGCSE COMPUTER SCIENCE
PPTX
Basic programming concepts
PPT
Basic Web Concepts
Introduction to computer programming
Sudoku solver ppt
Basic Computer Programming
Ms Word 2010 Training In Ambala ! Batra Computer Centre
Static dynamic and active web pages
Introduction To Web Technology
Microsoft word ppt presentation
Access 2016 module 1 ppt presentation
Gmail introduction
The Complete Beginners Guide to Using Canva
Basic of qbasic
Convert Hexadecimal to decimal
Email basics
Microsoft Word: Working with Tables
Graphical User Interface
Programming Fundamentals lecture 1
CAMBRIDGE IGCSE COMPUTER SCIENCE
Basic programming concepts
Basic Web Concepts
Ad

Viewers also liked (8)

PPT
Qbasic introduction
PPTX
Qbasic Tutorial
PPT
Introduction to qbasic
PPTX
QBASIC
PPTX
QBASIC: A Tool For Modern Programming
PPTX
The Knowledge of QBasic
PPTX
Qbasic program
PPTX
Introduction to Programming and QBasic Tutorial
Qbasic introduction
Qbasic Tutorial
Introduction to qbasic
QBASIC
QBASIC: A Tool For Modern Programming
The Knowledge of QBasic
Qbasic program
Introduction to Programming and QBasic Tutorial
Ad

Similar to Qbasic (20)

PPT
Qbasic notes
PDF
10th class computer science notes in english by cstechz
PPT
Computer programming k 12
PPTX
QBASIC: A Tool For Modern Programming
PPTX
02 Algorithms and flowcharts - computers.pptx
PPTX
Qbesic programming class 9
PPTX
BASIC programming language presentation.pptx
DOCX
Q basic ch
PPT
programming.ppt
PDF
Pascal programming lecture notes
PPTX
Algorithm and psuedocode
PDF
DATAND ALGORITHMSI (DSA010)_LESSON 1.pdf
DOCX
Computer science 3rd Term Notes
PPTX
Algorithm Design and Problem Solving [Autosaved].pptx
PPTX
vingautosaved-230525024624-6a6fb3b2.pptx
PPT
Programming
PPTX
Microprocessor chapter 9 - assembly language programming
PPTX
Assembly Language Programming
PPTX
Input-output
PPT
Chapter 2- Prog101.ppt
Qbasic notes
10th class computer science notes in english by cstechz
Computer programming k 12
QBASIC: A Tool For Modern Programming
02 Algorithms and flowcharts - computers.pptx
Qbesic programming class 9
BASIC programming language presentation.pptx
Q basic ch
programming.ppt
Pascal programming lecture notes
Algorithm and psuedocode
DATAND ALGORITHMSI (DSA010)_LESSON 1.pdf
Computer science 3rd Term Notes
Algorithm Design and Problem Solving [Autosaved].pptx
vingautosaved-230525024624-6a6fb3b2.pptx
Programming
Microprocessor chapter 9 - assembly language programming
Assembly Language Programming
Input-output
Chapter 2- Prog101.ppt

More from Shubham Gupta (13)

PPTX
Stone age
PPTX
Robert frost
PPTX
Presentation of eye ths
PPTX
Mahatma gandhi in hindi
PPTX
dowry like evils
PPTX
Gender inequality
PPTX
Com ppt shubham
PPTX
The diversity of india
PPTX
Gender inequality
PPTX
pollution
PPTX
computer memory
PPTX
Robert frost
PPTX
Presentation on eye
Stone age
Robert frost
Presentation of eye ths
Mahatma gandhi in hindi
dowry like evils
Gender inequality
Com ppt shubham
The diversity of india
Gender inequality
pollution
computer memory
Robert frost
Presentation on eye

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PDF
advance database management system book.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
IGGE1 Understanding the Self1234567891011
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
1_English_Language_Set_2.pdf probationary
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
RMMM.pdf make it easy to upload and study
202450812 BayCHI UCSC-SV 20250812 v17.pptx
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Indian roads congress 037 - 2012 Flexible pavement
Supply Chain Operations Speaking Notes -ICLT Program
History, Philosophy and sociology of education (1).pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Computing-Curriculum for Schools in Ghana
Digestion and Absorption of Carbohydrates, Proteina and Fats
advance database management system book.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
IGGE1 Understanding the Self1234567891011
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
1_English_Language_Set_2.pdf probationary
Chinmaya Tiranga quiz Grand Finale.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Chinmaya Tiranga Azadi Quiz (Class 7-8 )

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.