AME 209: 13. Basic Python Syntax and Data Types

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/28

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards for reviewing Python syntax and data types.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

29 Terms

1
New cards

Dynamic typing

Variables do not need a declared type; the type is determined at runtime based on the assigned value. The same variable name can refer to different types over time

2
New cards

int

Whole numbers

3
New cards

float

Floating point value — all numbers

4
New cards

str

Characters

5
New cards

bool

Logical — True or False

6
New cards

Valid variable names

Must start with a letter or underscore; can contain letters, digits, and underscores; cannot contain spaces or special characters.

7
New cards

operator +

Addition

8
New cards

operator -

Subtraction

9
New cards

operator *

Multiplication

10
New cards

operator /

Division (always returns float)

11
New cards

operator //

Integer (floor) division. Rounds down to the nearest whole number

12
New cards

operator %

Modulo (remainder). Gives the remainder after division; useful for patterns, checking even/odd, or cycling through options

13
New cards

operator **

Exponentiation

14
New cards

operator ==

Equal to

15
New cards

operator !=

Not equal to

16
New cards

operator <

Less than

17
New cards

operator <=

Less than or equal to

18
New cards

and

True if both are True

19
New cards

or

True if at least one is True

20
New cards

not

Inverts the Boolean value

21
New cards

Truth table

Used to show all possible outcomes of logical expressions, helping visualize how operators behave depending on input values (True or False).

22
New cards

Short-circuiting

Refers to how logical operators like 'and' and 'or' stop evaluating expressions as soon as the result is known.

23
New cards

Order of operations / Operator precedence

Determines the order in which expressions are evaluated. PEMDAS.

24
New cards

Is Python case senstive?

Yes

25
New cards

operator >

Greater than

26
New cards

operator >=

Greater than or equal to

27
New cards

Concatenation with +

Combines strings. “hello” + “world” => “hello world”

28
New cards

Repetition with *

Repeats the string. “a” * 3 => “aaa”

29
New cards

Membership with in

Checks if a substring is present. “cat” in “scatter” => True