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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is an algorithm

A

set of instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is a variable

A

in a computer program, preforms as a container for storing data values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

variable types

A

float: decimals
interger(int): whole numbers
string(str): letters, characters and numbers
boolean: true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

#

A

comment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

“”

A

speech

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

print (…)

A

prints out whatever you input into the brackets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly