Basic Concepts Flashcards

1
Q

print()

A

Function to output text
ex: print(‘Hello world!’) –> Hello world!

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

+, -

A

Addition, subtraction
ex: print(2 + 5 - 3) –> 4

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

Python follows PEMDAS

A

True

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

*, /

A

Multiplication, Division
ex: print(5 * 4 / 2) –> 10.0 (division produces float)

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

Float

A

Numbers that aren’t integers/use decimals
ex: 0.5, 0.333333333…, -7.1283, 6.0

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

**

A

Exponent
ex: print(9(1/2)) –> 3.0, print(52**2) –> 625

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

//

A

Floor division
ex: print(20//6) –> 3

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

%

A

Modulo operator, remainder
ex:print(10%9) –> 1

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