Commands Flashcards

1
Q

What is the first basic command?

A

Print (with bracets) “no = sign”

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

what are conditionals?

A

“IF” statements

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

What are the numeric expressions?

A

Addition +
Subtraction -
Multiplication *
Division /
Power **
Remainder %

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

What is the operator precedence? Order of operations.

A

Parenthesis
Power
Multiplication
Addition
Left to Right

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

What are floating point numbers?

A

Numbers with decimal parts.

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

what is a value?

A

a letter or a number

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

what is a string?

A

a string of words and are enclosed in quotation marks and brackets

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

what is “str”?

A

string

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

what is “int”?

A

integer

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

what do decimals belong to?

A

float

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

what is a variable?

A

Creating essentially a box that the program will go back to to retrieve information.

THIS IS A VARIABLE
eggs = 2
banana = 1
salad = 10
steak_and_rice = 30

print (“breakfast cost:”)
print (eggs + banana)

print (“lunch:”)
print (salad)

print (“dinner:”)
print (steak_eggs_rice + salad)

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

what is an assignment statement?

A

creates new variables and gives them values

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

what is a script?

A

a sequence of statements

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

How do you not repeat yourself?

A

Use a variable

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

What are numbers with a decimal?

A

Floating point