Skip to content

Commit

Permalink
lecture 2
Browse files Browse the repository at this point in the history
  • Loading branch information
caalo committed Sep 26, 2024
1 parent 9e8bb16 commit 88c884e
Show file tree
Hide file tree
Showing 4 changed files with 317 additions and 116 deletions.
2 changes: 1 addition & 1 deletion 01-intro-to-computing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ And there is an operational equivalent:
We will mostly look at functions with input arguments and return types in this course, but not all functions need to have input arguments and output return. Let's look at some examples of functions that don't always have an input or output:

| Function call | What it takes in | What it does | Returns |
|----------------|----------------|-------------------------|----------------|
|---------------------------------------------------------------------------|--------------------------|---------------------------------------------------------------|---------|
| [`pow(a, b)`](https://docs.python.org/3/library/functions.html#pow) | integer `a`, integer `b` | Raises `a` to the `b`th power. | Integer |
| [`time.sleep(x)`](https://docs.python.org/3/library/time.html#time.sleep) | Integer `x` | Waits for `x` seconds. | None |
| [`dir()`](https://docs.python.org/3/library/functions.html#dir) | Nothing | Gives a list of all the variables defined in the environment. | List |
Expand Down
2 changes: 1 addition & 1 deletion 02-data-structures.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The list data structure we have been working with is an example of an **Object**

- **Attributes** that hold subset or additional data for the object.

- Functions called **Methods** that automatically takes the object as input.
- Functions called **Methods** that are for the object and *have to* take in the variable referenced as an input

This organizing structure on an object applies to pretty much all Python data types and data structures.

Expand Down
Loading

0 comments on commit 88c884e

Please sign in to comment.