python Flashcards
1
Q
what are the 2 types of error
A
- syntax - the written code does match the rules of the programming language
- logical - when the program works but not how intended
2
Q
what is an algorithm
A
set of instructions
3
Q
what is a variable
A
in a computer program, preforms as a container for storing data values
4
Q
variable types
A
float: decimals
interger(int): whole numbers
string(str): letters, characters and numbers
boolean: true or false
5
Q
#
A
comment
6
Q
“”
A
speech
7
Q
print (…)
A
prints out whatever you input into the brackets
8
Q
if and elif
A
if - to conditionally excite a particular block of code
elif - short for ‘else if’ - to use for a second if