- Information
- AI Chat
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.
Was this document helpful?
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.
CSC1015F Testing and Debugging
Course: Computer science1015 (CSC1015F)
257 Documents
Students shared 257 documents in this course
University: University of Cape Town
Was this document helpful?
This is a preview
Do you want full access? Go Premium and unlock all 7 pages
Access to all documents
Get Unlimited Downloads
Improve your grades
Already Premium?
!
Errors!
What is an error?!
when your program does not behave as intended or expected.!•
!
What is a bug?!
An error!•
!
Debugging!
the art of removing bugs!•
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Types of Errors - When (1)!
“Compile” time error!•
- discovered when program is checked by the Python interpreter, before its run.!
- a result of improper use of Python language !
- usually Syntax Errors!
- e.g. !
!
!
Types of Errors - When (2)!
Run-time Error!•
- Program structure is correct, but does not execute as expected!
- e.g. x = 0 !
# y = 15/x!
!
- Examples of Python runtime errors!
#- division by zero!
#- performing an operation on incompatible types!
#- using an identifier which has not been defined!
#!
Types of Errors - Why (1)!
Syntax error!•
- Program does not pass checking/ compiling stage!
- improper use of python language!
- e.g. product = x y !
!
grammatical
errors
missing
full
stop
spelling
mistake
etc
product Imissing
11operator
division
by
zero
multiplying
anumber
with
a
string
1
character
Why is this page out of focus?
This is a Premium document. Become Premium to read the whole document.
Why is this page out of focus?
This is a Premium document. Become Premium to read the whole document.