Learning Intention I will learn about the different types of programming errors.

Slides:



Advertisements
Similar presentations
Programming Types of Testing.
Advertisements

Introduction to Computers and Programming Lecture 4: Mathematical Operators New York University.
Section 2.4: Errors. Common errors ● Mismatched parentheses ● Omitting space after operator or between numbers ● Putting operator between operands.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Python Mini-Course University of Oklahoma Department of Psychology Day 1 – Lesson 2 Fundamentals of Programming Languages 4/5/09 Python Mini-Course: Day.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
Programming Translators.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Introduction to Computers and Java Chapter 1.3. A Sip of Java: Outline History of the Java Language Applets A First Java Program Compiling a Java Program.
Programming Lifecycle
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
Dealing with Errors. Error Types Syntax Errors Runtime Errors Logical Errors.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Errors “Computer says no..”. Types of Errors Many different types of errors new ones are being invented every day by industrious programming students..
Lecture 4 Programming Technique Programming Appreciation.
Basic Programming Lingo. A program is also known as a  Sequence of instructions  Application  App  Binary  Executable.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
REVIEW No curveballs this time …. PROBLEM TYPE #1: EVALUATIONS.
Introduction to Testing CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Debugging, Escape Command, More Math. It’s your birthday!  Write a program that asks the user for their name and their age.  Figure out what their birth.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
ERRORS. Types of errors: Syntax errors Logical errors.
Programming Errors. Errors of different types Syntax errors – easiest to fix, found by compiler or interpreter Semantic errors – logic errors, found by.
Java FilesOops - Mistake Java lingoSyntax
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
The Hashemite University Computer Engineering Department
REVIEW No curveballs this time …. PROBLEM TYPE #1: EVALUATIONS.
5.01 Understand Different Types of Programming Errors
Testing.
COMPUTER PROGRAMMING Year 9 – Unit 9.04 Week 3. Open the Python INTERPRETER Can you use the interpreter to solve these maths problems? 156 add
COMPUTER PROGRAMMING I SUMMER Understand Different Types of Programming Errors.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
Fundamental Programming Fundamental Programming Data Processing and Expressions.
Lecture 3 Computer Programming -1-. The main steps of program development to solve the problem: 1- problem definition : The problem must be defined into.
Software Engineering Algorithms, Compilers, & Lifecycle.
Harvard Mark I Howard Aiken was a pioneer in computing and a creator of conceptual design for IBM in the 1940s. He envisioned an electro-mechanical computing.
Last week: We talked about: History of C Compiler for C programming
5.01 Understand Different Types of Programming Errors
ME 142 Engineering Computation I
Component 1.6.
Data Types Variables are used in programs to store items of data e.g a name, a high score, an exam mark. The data stored in a variable is entered from.
CS170 – Week 1 Lecture 3: Foundation Ismail abumuhfouz.
Can you pick 3 errors from this
7 - Programming 7P, Q, R - Testing.
The Software Development Cycle
Software Design and Development
Handling errors try except
Microsoft Access Illustrated
5.01 Understand Different Types of Programming Errors
Designing and Debugging Batch and Interactive COBOL Programs
Problem Solving Techniques
Selection CIS 40 – Introduction to Programming in Python
An Introduction to Structured Program Design in COBOL
Teaching London Computing
Topics Introduction Hardware and Software How Computers Store Data
Spot the bug!.
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Learning Intention I will learn about evaluating a program.
Learning Intention I will learn about programming using selection (making choices) with one condition.
Software Development Process
Lesson 2 Get Started with Python – Post-Installation – Use the GUI.
ICT Programming Lesson 1:
Learning Intention I will learn how to use an array to store data in a program.
Errors in programming.
Learning Intention I will learn about selection with multiple conditions.
WJEC GCSE Computer Science
CHAPTER 6 Testing and Debugging.
The Software Development Cycle
Presentation transcript:

Learning Intention I will learn about the different types of programming errors.

Analysis Design Implementation Testing Documentation Evaluation

Types of Error There are three types of error which can occur when you are creating programs: syntax execution logic

Syntax Errors Syntax errors are sometimes caused by typing mistakes e.g.

Syntax Errors Syntax errors prevent the program from running.

Syntax Errors Syntax errors are sometimes caused by not knowing the syntax (rules) of the programming language e.g.

Execution Errors Execution errors only show up when the program is running and cause it to crash e.g. divide by zero – dividing a number by 0 gives the answer infinity (∞)which the computer cannot store opening file that does not exist

Execution Errors Here is an example of code that attempts to divide by zero. Line 1 RECEIVE number1 FROM KEYBOARD Line 2 SET number2 TO number1 / 0 Line 3 SEND number2 TO DISPLAY

Logic Errors Logic errors cause the program to operate incorrectly but not crash. The program will run but the output will be wrong. e.g. adding two numbers instead of subtracting using < instead of <= in a condition (If)

Logic Errors The following program runs but the output will not match what is expected. Line 1 RECEIVE number1 FROM KEYBOARD Line 2 RECEIVE number2 FROM KEYBOARD Line 3 SET average TO (number1 + number2) / 2 Line 4 SEND average TO DISPLAY Which line has the logic error?

Success Criteria I can describe and identify the different types of error in a program.