M03 - Dependencies, Modules, Packages Flashcards

1
Q

import syntax & syntax w/ alias

A

import module_name

import module_name as mn

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

Order of how code reads

A

Module ->
Classes/Functions/Variables ->
Methods used for functions and classes

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

Datetime module example of how code reads (nesting doll description)

A
Ex:
datetime.datetime.now( )
#w/ alias:
dt.datetime.now( )
1. Module: datetime 
->
2. datetime Classes:
date, datetime, time, timedelta, timezone
->
3. datetime Methods
day, hour, microsecond, minute, month, now, second, time, today, utcnow, weekday, year
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Packages

A
  • Folders that contain a set of Python modules
  • May contain various subpackages (or other folders)
  • Imported with the import statement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Dependencies

A

-Modules and packages, or a programming script that someone else has written, that allows you to increase the functional programming of your code, or speed and efficiency

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

Modules

A

-Separate software component
-Usually Python files w/ .py extension
-Name of the module will be the name of the file
-Can have the following defined and implemented:
+Functions
+Classes
+Variables

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

CSV Module syntax

Sytnax to see all functions available in CSV

A

import csv

dir(csv)

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