Python for GCSE

3: Debugging and data types

Revision tools
You can print this page for a quick reference guide or you can use the tools below to create printable test sheets
3.1: understand the difference between syntax, logic and runtime errors
Debugging and data types
KeywordDefinition
logic errortype of error which might not make the program crash but the program output may be unexpected because the programmer wrote the wrong instructions in code
runtime errortype of error which makes the program crash whilst it's running because it tries to do something impossible
syntax errortype of error which prevents code from running at all because the rules of the programming language have been broken
3.2: be able to debug code using IDE tools and error messages
Debugging and data types
KeywordDefinition
breakpointa debugging tool where you can force the program to pause when it reaches a particular line of code
debugfind and fix error messages
error messagedescription of what went wrong with a program
IDEintegrated development environment: a tool which lets you write, run and debug your code
line numberpart of an error message which gives an indication of where the error might be close to
steprun one line of code at a time
watchview the value stored in a variable as the program runs
3.3: be able to convert between data types
Debugging and data types
KeywordDefinition
booleandata type with values of either True or False
castingconverting from one data type to another
characterdata type with a single letter / digit / symbol as a value
floatdata type with values that can be any number with a decimal point
integerdata type with values that can be any whole number
stringdata type with text values of zero or more characters