Module 1: Data Typers, Expressions, Operations

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:51 PM on 6/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

34 Terms

1
New cards

Numeric - All Numbers

  • integers, floating-point numbers, complex numbers

  • Boolen Values (technically numeric: 0-Fals, 1-True)

2
New cards

Sequences - Order Collection

  • lists, typles, ranges

  • strings ( a seqience of characters)

3
New cards

Mapping - Key Value Collections

  • dictions

4
New cards

Integers

whole number of any size or any value without a decimal

5
New cards

Floating-Point Numbers or Float

  • decimal numbers with precision up to 14 decimal places

  • not a number (nan)

  • negative infinite (-inft)

  • positive infinite (+inf)

6
New cards

Bankers Rounding / Rounding Half to Even

will always prefer the closest even integer

7
New cards

Complex

numbers with a real and an imaginary part. Any numeric value with the suffix “j“

  • Example: complex_num - 12 + 2j

8
New cards

Boolen

This data type represents two values of true or false. Capitalize True or False

9
New cards

Sequence - Strings

Represented by enclosing the value in a single or double quotes

10
New cards
11
New cards

len():

return the # of characters; length of the string

12
New cards

replace():

replaces part of the string with another

13
New cards

lower/upper ():

changes strings with either lower/upper case

14
New cards

isnumeric():

checks if the string is a number

15
New cards

split():

splits strings into separate parts

16
New cards

int():

This function converts any value you define in between the parentheses into an integer type

17
New cards

float():

This function converts any value you define into a float type

18
New cards

str():

Convert any value you define into a string function

19
New cards

Concatenation

Operation of “gluing” string values together

  • uses the “+” operator

  • cannot perform addition with a concatenation

20
New cards

F-string

allows you to embed variables or expressions directly inside a string

21
New cards

Rounding

Add a : after the float vale then add a period. Followed by a number to the decimal place, add F if you want it fixed.

22
New cards

Escape Sequences

A special type of character that we can use to represent characters or formatting into a string

  • \ → escpae sequence

23
New cards

/b:

backspace

24
New cards

\n:

new line

25
New cards

\t:

tab(indentation)

26
New cards

\”:

double-quote

27
New cards

\\:

backslash

28
New cards

\’:

single-quote

29
New cards

Expression

A combination of values, variables, and operators that your computer will calculate into a value.

30
New cards

Literals

Simplest expressions since they do not need evaluation since they are values themselves

31
New cards

Operators

Whenever you use any operators, like mathematical operators

32
New cards

Function Call

Some are expressions, the computer must evaluate the value it returns

33
New cards

Logical Operators

not, and, or

34
New cards

Comparison Operators

  • == : equality

  • != : inequality

  • > : greater than

  • < : less than

  • >=: greater/equal to

  • <=: less than/equal to

  • in, not it, is, is not