SlideShare ist ein Scribd-Unternehmen logo
1 von 17
What is Computer
Programming?
Computer programming (often shortened to programming) is a
process that leads from an original formulation of a computing
problem to executable computer programs. Programming involves
activities such as analysis, developing understanding, generating
algorithms, verification of requirements of algorithms including
their correctness and resources consumption, and implementation
(commonly referred to as coding) of algorithms in a
target programming language.
Purpose
The purpose of programming is to find a sequence of
instructions that will automate performing a specific task or
solving a given problem. The process of programming thus
often requires expertise in many different subjects, including
knowledge of the application domain, specialized
algorithms and formal logic.
Programmers
Computer programmers are those who write computer software.
Their jobs usually involve:
‱ Coding
‱ Debugging
‱ Documentation
‱ Integration
‱ Maintenance
‱ Requirements analysis
‱ Software architecture
‱ Software testing
‱ Specification
Programming Languages
Different programming languages support different styles of programming
(called programming paradigms). The choice of language used is subject to
many considerations, such as company policy, suitability to task, availability of
third-party packages, or individual preference. Ideally, the programming
language best suited for the task at hand will be selected. Trade-offs from this
ideal involve finding enough programmers who know the language to build a
team, the availability of compilers for that language, and the efficiency with
which programs written in a given language execute. Languages form an
approximate spectrum from "low-level" to "high-level"; "low-level" languages
are typically more machine-oriented and faster to execute, whereas "high-
level" languages are more abstract and easier to use but execute less quickly.
It is usually easier to code in "high-level" languages than in "low-level" ones.
Introduction to QBASIC
BASIC stands for Beginner’s All Purpose
Symbolic Instruction Code. It was invented
in 1963, at Dartmouth College, by the
mathematicians John George Kemeny and
Tom Kurtzas.
Features of QBASIC
1. It is a user friendly language.
2. It is widely known and accepted
programming language.
3. It is one of the most flexible languages, as
modification can easily be done in already
existing program.
4. Language is easy since the variables can be
named easily and uses simple English
phrases with mathematical expressions.
Rules of QBASIC
Every programming language has a set of rules that have to
be followed while writing a program, following are some
rules of QBASIC language:
1. All Qbasic programs are made up of series of
statements, which are executed in the order in which
they are written.
2. Every statement should have at least one Qbasic
command word. The words that BASIC recognizes are
called keywords.
3. All the command words have to be written using some
standard rules, which are called “Syntax Rules”. Syntax is
the grammar of writing the statement in a language.
Syntax Errors are generated when improper syntax is
detected.
QBASIC DATA
Data is a collection of facts and figures that is
entered into the computer through keyboard.
Data is of two types:
1. CONSTANT
a. Numeric Constant
b. Alphanumeric Constant/String
2. Variable
a. Numeric Variable
b. Alphanumeric Variable
Constant
Data whose value does not change or remains
fixed. There are two types of constants:
a. Numeric Constant: Numbers – negative or
positive used for mathematical calculations
e.g. – 10,20,0
b. Alphanumeric Constant/String: Numbers
or alphabets written within double
quotes(inverted commas “ “).
e.g. “Computer”, “Operating System”
Variable
Data whose value is not constant and may change due to some
calculation during the program execution. It is a location in the
computer’s memory, which stores the values. Depending on what
value is held. Variables are of two types:
a) Numeric Variable: The variable that holds a Numeric Constant
for arithmetic calculations (+, -, *, /) is called a Numeric Variable.
e.g. A=50, here A is the Numeric Variable
b. Alphanumeric Variable: The variable that holds an
Alphanumeric Constant, which cannot be used for arithmetic
calculations, is called Alphanumeric Variable or String Variable.
An Alphanumeric variable must end with a $ sign and the
Alphanumeric constant must be enclosed in inverted commas.
e.g. Name$=“Akanksha”, here Name$ is an Alphanumeric
Variable
Types of Mode in QBASIC
Once QBASIC program is loaded into the
computer memory, it displays Ok prompt. Ok
means it is ready to accept the commands.
QBASIC can be made to translate in two modes:
1. Direct Mode
2. Program Mode
Direct Mode
The mode accepts single line instructions from
the user and the output is viewed as soon as
enter key is pressed. The instructions are not
stored in the memory. This mode can be used
to do quick calculations. They do not have line
numbers.
e.g. Print 3+4
Print “This is the Direct mode in QBASIC”
Program Mode
The mode is used to type a program which is
stored in the memory. They have line
numbers. We have to give the command to
get the output.
e.g. 10 Print 3+4
20 End
RUN
Command/Keywords in QBASIC and
their Functions
The following commands do not need line number.
1. LIST- The command is used to list the program on the screen.
2. RUN- The command is used to execute the program.
3. LLIST- The command is used to list of program as a hardcopy.
4. LPRINT- The command is used to get the output of the program on the
hard copy.
5. NEW- The command is used to clear the memory of the existing
program.
6. SYSTEM- The command is used to take you back to dos prompt.
7. PRINT AND CLS command can also be used without a line number.
Print is used to view the display on the screen and CLS to clear the
screen.
8. RME- The command is used to show the position of the mistake.
9. SAVE- The keyword is used to save the program.
10. LOAD- The keyword is used to LOAD the program from disk to the
memory.
QBASIC REMINDERS
A QBASIC program consists of lines containing
1. A line number
2. A QBASIC keyword like PRINT, END etc.
3. Each program line begins with positive
number.
4. No two lines should have same number.
Running a Program
RUN is the command used to execute the
program and get the output on the screen.
Writing a New Program
It is possible to overwrite lines with the new
statements, but if you want to write a totally
new program use a NEW command.
Exiting QBASIC
In order to exit the QBASIC program SYSTEM
command is used.
Vincent Valenzuela
Joseph Loveranes
9-Neumann
SY 2014-2015

Weitere Àhnliche Inhalte

Was ist angesagt?

Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
History of Computer
History of ComputerHistory of Computer
History of ComputerNikki Paccial
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languageskitturashmikittu
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNoel Malle
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languagesRohit Shrivastava
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer ProgrammingAllen de Castro
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language TranslatorRanjeet Kumar
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchartRohit Shrivastava
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2REHAN IJAZ
 
Computer Software And its types
Computer Software And its typesComputer Software And its types
Computer Software And its typesMirza Kaleem
 
Computer Programming - Lecture 1
Computer Programming - Lecture 1Computer Programming - Lecture 1
Computer Programming - Lecture 1Dr. Md. Shohel Sayeed
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)Maliha Jahan
 
COMPUTER PROGRAMMING
COMPUTER PROGRAMMINGCOMPUTER PROGRAMMING
COMPUTER PROGRAMMINGimtiazalijoono
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating SystemsMukesh Chinta
 

Was ist angesagt? (20)

Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
History of Computer
History of ComputerHistory of Computer
History of Computer
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Generation of computer languages
Generation of computer languagesGeneration of computer languages
Generation of computer languages
 
System software
System softwareSystem software
System software
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language Translator
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Introduction to Computer Software
Introduction to Computer SoftwareIntroduction to Computer Software
Introduction to Computer Software
 
Computer Programming
Computer Programming Computer Programming
Computer Programming
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
 
Computer Software And its types
Computer Software And its typesComputer Software And its types
Computer Software And its types
 
Computer Programming - Lecture 1
Computer Programming - Lecture 1Computer Programming - Lecture 1
Computer Programming - Lecture 1
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
 
COMPUTER PROGRAMMING
COMPUTER PROGRAMMINGCOMPUTER PROGRAMMING
COMPUTER PROGRAMMING
 
Introduction to Operating Systems
Introduction to Operating SystemsIntroduction to Operating Systems
Introduction to Operating Systems
 
Computer
ComputerComputer
Computer
 

Ähnlich wie Computer programming

Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & LanguagesGaditek
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overviewamudha arul
 
C programming
C programmingC programming
C programmingJigarthacker
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design Dr. C.V. Suresh Babu
 
Programming in c
Programming in cProgramming in c
Programming in cvishnu973656
 
Programming in C
Programming in CProgramming in C
Programming in CRvishnupriya2
 
SSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdfSSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdfJacobDragonette
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)nharsh2308
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxAsst.prof M.Gokilavani
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 

Ähnlich wie Computer programming (20)

Qbasic program
Qbasic programQbasic program
Qbasic program
 
Qbasic
QbasicQbasic
Qbasic
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Programming Paradigm & Languages
Programming Paradigm & LanguagesProgramming Paradigm & Languages
Programming Paradigm & Languages
 
Ic lecture8
Ic lecture8 Ic lecture8
Ic lecture8
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
C programming
C programmingC programming
C programming
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
SSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdfSSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdf
 
Qbasic Tutorial
Qbasic TutorialQbasic Tutorial
Qbasic Tutorial
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Introduction to programming c
Introduction to programming cIntroduction to programming c
Introduction to programming c
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptx
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
C.pdf
C.pdfC.pdf
C.pdf
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 

KĂŒrzlich hochgeladen

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Christopher Logan Kennedy
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 

KĂŒrzlich hochgeladen (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Computer programming

  • 1. What is Computer Programming? Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. Programming involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, and implementation (commonly referred to as coding) of algorithms in a target programming language.
  • 2. Purpose The purpose of programming is to find a sequence of instructions that will automate performing a specific task or solving a given problem. The process of programming thus often requires expertise in many different subjects, including knowledge of the application domain, specialized algorithms and formal logic.
  • 3. Programmers Computer programmers are those who write computer software. Their jobs usually involve: ‱ Coding ‱ Debugging ‱ Documentation ‱ Integration ‱ Maintenance ‱ Requirements analysis ‱ Software architecture ‱ Software testing ‱ Specification
  • 4. Programming Languages Different programming languages support different styles of programming (called programming paradigms). The choice of language used is subject to many considerations, such as company policy, suitability to task, availability of third-party packages, or individual preference. Ideally, the programming language best suited for the task at hand will be selected. Trade-offs from this ideal involve finding enough programmers who know the language to build a team, the availability of compilers for that language, and the efficiency with which programs written in a given language execute. Languages form an approximate spectrum from "low-level" to "high-level"; "low-level" languages are typically more machine-oriented and faster to execute, whereas "high- level" languages are more abstract and easier to use but execute less quickly. It is usually easier to code in "high-level" languages than in "low-level" ones.
  • 5. Introduction to QBASIC BASIC stands for Beginner’s All Purpose Symbolic Instruction Code. It was invented in 1963, at Dartmouth College, by the mathematicians John George Kemeny and Tom Kurtzas.
  • 6. Features of QBASIC 1. It is a user friendly language. 2. It is widely known and accepted programming language. 3. It is one of the most flexible languages, as modification can easily be done in already existing program. 4. Language is easy since the variables can be named easily and uses simple English phrases with mathematical expressions.
  • 7. Rules of QBASIC Every programming language has a set of rules that have to be followed while writing a program, following are some rules of QBASIC language: 1. All Qbasic programs are made up of series of statements, which are executed in the order in which they are written. 2. Every statement should have at least one Qbasic command word. The words that BASIC recognizes are called keywords. 3. All the command words have to be written using some standard rules, which are called “Syntax Rules”. Syntax is the grammar of writing the statement in a language. Syntax Errors are generated when improper syntax is detected.
  • 8. QBASIC DATA Data is a collection of facts and figures that is entered into the computer through keyboard. Data is of two types: 1. CONSTANT a. Numeric Constant b. Alphanumeric Constant/String 2. Variable a. Numeric Variable b. Alphanumeric Variable
  • 9. Constant Data whose value does not change or remains fixed. There are two types of constants: a. Numeric Constant: Numbers – negative or positive used for mathematical calculations e.g. – 10,20,0 b. Alphanumeric Constant/String: Numbers or alphabets written within double quotes(inverted commas “ “). e.g. “Computer”, “Operating System”
  • 10. Variable Data whose value is not constant and may change due to some calculation during the program execution. It is a location in the computer’s memory, which stores the values. Depending on what value is held. Variables are of two types: a) Numeric Variable: The variable that holds a Numeric Constant for arithmetic calculations (+, -, *, /) is called a Numeric Variable. e.g. A=50, here A is the Numeric Variable b. Alphanumeric Variable: The variable that holds an Alphanumeric Constant, which cannot be used for arithmetic calculations, is called Alphanumeric Variable or String Variable. An Alphanumeric variable must end with a $ sign and the Alphanumeric constant must be enclosed in inverted commas. e.g. Name$=“Akanksha”, here Name$ is an Alphanumeric Variable
  • 11. Types of Mode in QBASIC Once QBASIC program is loaded into the computer memory, it displays Ok prompt. Ok means it is ready to accept the commands. QBASIC can be made to translate in two modes: 1. Direct Mode 2. Program Mode
  • 12. Direct Mode The mode accepts single line instructions from the user and the output is viewed as soon as enter key is pressed. The instructions are not stored in the memory. This mode can be used to do quick calculations. They do not have line numbers. e.g. Print 3+4 Print “This is the Direct mode in QBASIC”
  • 13. Program Mode The mode is used to type a program which is stored in the memory. They have line numbers. We have to give the command to get the output. e.g. 10 Print 3+4 20 End RUN
  • 14. Command/Keywords in QBASIC and their Functions The following commands do not need line number. 1. LIST- The command is used to list the program on the screen. 2. RUN- The command is used to execute the program. 3. LLIST- The command is used to list of program as a hardcopy. 4. LPRINT- The command is used to get the output of the program on the hard copy. 5. NEW- The command is used to clear the memory of the existing program. 6. SYSTEM- The command is used to take you back to dos prompt. 7. PRINT AND CLS command can also be used without a line number. Print is used to view the display on the screen and CLS to clear the screen. 8. RME- The command is used to show the position of the mistake. 9. SAVE- The keyword is used to save the program. 10. LOAD- The keyword is used to LOAD the program from disk to the memory.
  • 15. QBASIC REMINDERS A QBASIC program consists of lines containing 1. A line number 2. A QBASIC keyword like PRINT, END etc. 3. Each program line begins with positive number. 4. No two lines should have same number.
  • 16. Running a Program RUN is the command used to execute the program and get the output on the screen. Writing a New Program It is possible to overwrite lines with the new statements, but if you want to write a totally new program use a NEW command. Exiting QBASIC In order to exit the QBASIC program SYSTEM command is used.