Python lectures Flashcards

1
Q

Python

A

a high-level programming language that runs on top of your operating system. it is object-oriented and very portable since it can run on every machine. it is also very extensible since you can add extensions and libraries.

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

Pandas

A

the visualisation component/extension that allows you to draw figures.

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

Jupyter

A

allows you to save intermediate results, which is not possible in traditional programming. this is important because the process of analysing data is important for data management.

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

code/source code

A

the sequence of instructions in a program.

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

syntax

A

the set of legal structures and commands that can be used in a particular programming language. It’s like the grammar of a language, but for computers.

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

output

A

the process of displaying, writing, or communicating text, values, or other information to the user, the computer hard drive, or to a network of other computers or users.

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

console

A

the text box onto which output is printed.

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

functions

A

a subroutine or method. It is a self-contained block of code that performs a specific task. It’s like a mini-program within your larger program, designed to handle a well-defined job. The key purpose of functions are to modularise code: Functions break down complex programs into smaller, manageable chunks, making code easier to understand, organize, and maintain. Other reasons for using function is to reuse code or to simplify complex tasks.

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

parameter

A

a formal argument and acts like a placehold variable within a function or method. it holds specific data that is provided when the function is called. its purpose is to allow functions to be flexible and reusable. functions can have multiple parameters. they accept different data inputs each time they are called.

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

variable modification

A

when a variable already exists, but gets a new value assigned.

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

variable data types

A

define the kind of information a variable can hold and the operations that can be perfomed on it. it ensures data integrity, optimises memory usage, and enables specific operations.

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

type() function

A

tells you the data type of a variable.

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

type conversion

A

refers to the process of changing the data type of a variable from one data type to another. not every type can be converted, eg. a string.

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

input () function

A

used to collect data from the user during program execution. It pauses the program, reads or prompts the user for input, and then stores the entered value as a string so it can be used within the program.

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

operators

A

special symbols or keywords that perform specific operations on values and variables. They are the building blocks of expressions and play a crucial role in manipulating data, making comparisons, and controlling program flow.

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

screen

A

refers to the terminal window where the program is running, eg. colab boxes. this is where output is displayed.

17
Q

if/else statement

A

used to control the flow of execution in your code based on specific conditions. It allows you to execute different sets of code depending on whether a condition is true or false.

18
Q

condition

A

an expression that evaluates to either True or False. Conditions can be the state of a variable, or, for example, the result of a comparison of values, the result of a function call, the result of a membership test, or a combination of multiple conditions (through logical operators).

19
Q

comparison operators

A

symbols used to compare the values of two operands (data elements) and return boolean values (True or False) indicating the relationship between them. These operators are essential for conditional statements (if, else), loops (while, for), and various control flow structures.

20
Q

text comparisons

A

are case sensitive. each character gets a numerical value that is compared based on the order of characters.

21
Q

control flow

A

refers to the order in which your code executes. it determines which lines of code get run and when, allowing you to create logic in your programs.

22
Q

indentation

A

should only happen when there is a need for a separate block; after if, for, while, defining a function, or a class.

23
Q

list

A

ordered, mutable collections of elements enclosed in square brackets []. it is a variable that contains multiple values.

24
Q

elements

A

the values in a list, which are stored at an index.

25
Q

for loop

A

a powerful tool for iterating over sequences of elements. It allows you to execute a block of code repeatedly for each item in the sequence, making it an efficient way to automate tasks and process collections of data.

26
Q

while loop

A

a control flow structure that allows you to repeatedly execute a block of code as long as a specified condition remains true. It provides flexibility for situations where the number of iterations is unknown beforehand or depends on a dynamic condition.