SlideShare uma empresa Scribd logo
1 de 16
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.

Mais conteúdo relacionado

Mais procurados

Types of software
Types of softwareTypes of software
Types of software
latifah2001
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
salmankhan570
 

Mais procurados (20)

Types of software
Types of softwareTypes of software
Types of software
 
Computer Programming
Computer Programming Computer Programming
Computer Programming
 
Different types of operating systems
Different  types  of  operating  systems Different  types  of  operating  systems
Different types of operating systems
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Types of software
Types of softwareTypes of software
Types of software
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 
Types of software
Types of softwareTypes of software
Types of software
 
Types of software
Types of softwareTypes of software
Types of software
 
A presentation on system software
A presentation on system software A presentation on system software
A presentation on system software
 
Vb.net class notes
Vb.net class notesVb.net class notes
Vb.net class notes
 
Presentation on computer software
Presentation on computer softwarePresentation on computer software
Presentation on computer software
 
Qbasic program
Qbasic programQbasic program
Qbasic program
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Lesson 5 computer software
Lesson 5 computer softwareLesson 5 computer software
Lesson 5 computer software
 
High level and Low level Language
High level and Low level Language High level and Low level Language
High level and Low level Language
 
Macros in ms word
Macros in ms wordMacros in ms word
Macros in ms word
 
SYSTEM SOFTWARE
SYSTEM SOFTWARESYSTEM SOFTWARE
SYSTEM SOFTWARE
 
Software and its types
Software and its typesSoftware and its types
Software and its types
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
 

Semelhante a Qbasic

Semelhante a 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 introduction
Qbasic introductionQbasic introduction
Qbasic introduction
 
The Knowledge of QBasic
The Knowledge of QBasicThe Knowledge of QBasic
The Knowledge of QBasic
 
QBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern ProgrammingQBASIC: A Tool For Modern Programming
QBASIC: A Tool For Modern Programming
 
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
 

Mais de 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
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Último (20)

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 

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.