IGCSE Computer Science: Python

Ace your homework & exams now with Quizwiz!

return

(1) the value a function will produce after it has been run — it is also a Python keyword; (2) the 'end of line' key on a keyboard, sometimes called the enter key

while loop

a kind of loop that repeats code while a comparative statement returns True

modulus

a mathematical operator that is used to return the remainder from a division calculation; e.g. 22%7 returns 1

variable

a name that refers to a place in a computer's memory where data is stored; more loosely, it can also be used to refer to that data

float

a number data-type that can have a decimal value

integer

a number data-type that cannot have a decimal value and must be a whole number

tkinter

a package of classes that are often imported in to Python programs that give methods that are useful for producing windows, drawing images and producing animations

bug

a piece of code that is causing a program to fail to run properly or at all

loop

a piece of code that keeps repeating until a certain condition is met

infinite loop

a piece of code that keeps running forever; this is usually a bad thing

function

a reusable piece of code

module

a saved python file whose functions can be used by another program

operator

a symbol that performs a simple function on some code such as multiplying two numbers or comparing them to see if they are equal; see also comparative operator and mathematical operator

default

a value given to an argument or variable as a starting point

local variable

a variable that is defined inside a function and is only usable inside that function

global variable

a variable that is usable anywhere in a program

syntax error

an error produced when a computer fails to run a program because it cannot recognise the format of the code supplied; e.g. a syntax error would be produced if a bracket had not been closed

mathematical operator

an operator that performs some mathematical function on some numbers; e.g. multiplication or addition

output

data that is sent from a program to a screen or printer, etc

data-type

different types of information stored by the computer, for example floats, integers and strings

statement

sed in this book to mean a snippet of code; strictly speaking it is a piece of code that represents a command or action; e.g. a print statement

logical operator

see comparative operator

commenting

some text in a computer program that is for the human reader and is ignored by the computer when running the program - in Python all comments begin with a hash symbol #

comparative operator

sometimes called logic operators, they allow us to compare data in a program; they include == and > (others are found in Table 3 in the Appendix)

IDLE

stands for Integrated DeveLopment Environment; this is the IDE that comes with a normal Python 3 install

IDE

stands for Integrated Development Environment; IDLE is an example of one - they are special text editors with useful tools built in for programmers

hacking

taking some previously written code and re-writing bits to make it do something different

string

text data, which can be stored in a variable

equals operator

the equals sign is used to assign a value to a variable in coding, for example n=2 assigns the value 2 to the variable n

method

the name given to a function in a class

casting

the process of converting one data-type into another; e.g. sometimes a number may stored as text but need to be converted in to an integer - this can be done like this: int ("3")

script mode

this is when we use IDLE to help us write code that we will save in a file

interactive mode

this is when we use IDLE to try out snippets of code without saving them

escape sequence

when characters that have certain meanings in Python are required in strings they have to be "escaped" so that the computer knows they do not have their usual meaning; this is done by putting a slash in front of them e.g. \ "


Related study sets

Marketing 3343 Final Exam Review -Murdock 252-

View Set

Soil 3:Weathering, Soil, and Mass Movements

View Set

Chapter 5: Innovation and Entrepreneurship

View Set

Small Test - Economics EOC (GSE) UPDATED Domain: International Economics

View Set