Module 1 Flashcards

Python Basics

You may prefer our related Brainscape-certified flashcards:
1
Q

Assignment operator in Python

A

symbol is “=”
type of Binary operator that helps in modifying the variable to its left with the use of its value to the right

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

Arithmetic Operations

A

basic calculations made in daily life (+, -,*, /)

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

Array of numbers

A

set of #s or objects that follow a pattern presented as an arrangement of rows and columns to explain multiplication

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

Backslash

A

escape character used in Python strings to indicate that the character immediately following it should be treated in a special way (i.e. escaped character or raw string)

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

Boolean

A

Denoting a system of algebraic notation used to represent logical propositions by means of the binary digits 0 (false) and 1 (true)

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

Colon

A

represents an indented block
also used to fetch data and index ranges or arrays

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

Concatenate

A

Link (things) together in a chain or series
s1 = Hello
s2 = world
concatenated_string = s1 + s2
result = Hello world

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

Data engineering

A

turning raw data into information that an organization can understand and use by blending, testing, and optimizing data from numerous sources

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

Data science

A

interdisciplinary field that focuses on extracting knowledge from data sets which are typically huge in amount
encompasses analysis, preparing data for analysis, and presenting findings to inform high-level decisions in an organization

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

Data type

A

type of value a variable has and what type of mathematical, relational, or logical operations can be applied without causing an error

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

Single and Double Quote

A

symbol ‘ ‘ and “ “
used to represent strings in Python

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

Escape sequence

A

two or more characters that often begin with an escape character that tell the computer to perform a function or command

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

Application development

A

process of planning, designing, creating, testing, and deploying a software application to perform various business operations

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

Expression

A

combination of operators and operands that is interpreted to produce some other value

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

Float

A

Python float () function is used to return a floating-point number from a number or a string representation of a numeric value

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

Immutable

A

immutable objects are in-built datatypes (int, float, bool, string, Unicode, and tuple)
they cannot be changed after they are created

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

Integer

A

whole numbers (+, 0, -)

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

Manipulate

A

process of modifying a string or creating a new string by making changes to existing strings

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

Mathematical operations

A

calculating a value using operands and a math operator

20
Q

Negative indexing

A

allows you to access elements of a sequence from the end, using negative numbers as indexes (-1 starting from last element R > L)

21
Q

Operands

A

quantity on which an operation is done

22
Q

Operators in Python

A

perform operations on variables and values

23
Q

Replicate

A

make exact copy of

24
Q

Sequence

A

function whose domain is an interval of integers

25
Q

Slicing in Python

A

return a portion from defined list
name[x:y:z] x (start pt), y (end pt), z (stride)

26
Q

Special characters

A

one that is not considered a # or letter (symbols, accent marks, punctuation marks)

27
Q

Stride value

A

of bytes from one row of pixels in memory to the next row of pixels in memory

28
Q

Strings in Python

A

words

29
Q

Substring

A

sequence of characters that are part of an original string

29
Q

Type casting

A

process of converting one data type to another data type (aka Type coercion/conversion)

30
Q

Types in Python

A

data types represent the kind of value that tells what operations can be performed on particular data

31
Q

#

A

comment - ignored by Python executing code

32
Q

Indexing

A

my_string = “Michael”
mystring[0:4]
Mich

33
Q

Length

A

len(string_name)

34
Q

convert string to lowercase

A

lower()
my_string.lower()

35
Q

Print message or variable inside ()

A

print(“ “)
a = “1”
b = “2”
print (a+b)
12

36
Q

addition operator

A

+sub

37
Q

subtraction operator

A

-

38
Q

multiplication operator

A

*

39
Q

division operator

A

/

40
Q

floor division operator

A

//
division truncated after decimal

41
Q

modulo operator

A

% (remainder of division)

42
Q

replace substrings

A

replace()

string1 = “Hello”
string2 = string1.replace(“Hello”, “Hi”)

43
Q

extract a portion of string

A

slicing
my_string = “Hello, world”
substring = my_string[0:5]

44
Q

split string into a list based on delimiter

A

split()

split_text = my_string.split(“,”)

45
Q

convert string to uppercase

A

upper()

my_string.upper()

46
Q

remove leading/trailing whitespace

A

strip()

s1.strip()