Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
d-chambers committed Feb 22, 2024
1 parent 1e5db70 commit d8fc251
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions python_intro/modules/datatypes/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,15 @@ Variables reference a value
<br>

:::{.fragment}
```{.python filename="variables" code-line-numbers="1|2|3|4|5"}
```{.python filename="variables" code-line-numbers="1|2|3|4"}
bar = 1
foo = "two"
que = 3.0
por = bar
print(bar, foo, que, por)
```
:::

:::{.fragment}
```{python filename="variables" code-line-numbers="1|3|5"}
#| echo: false
bar = 1
foo = "two"
que = 3.0
por = bar
print(bar, foo, que, por)
```
:::


# Variables: Knowledge Check

Expand Down Expand Up @@ -86,7 +76,6 @@ print(foo)
- Boolean
- String
- List
- Dictionary


# Numbers
Expand Down Expand Up @@ -122,6 +111,8 @@ my_complex + 1

- Booleans can be either `True` or `False`

<br>

:::{.fragment}
```{.python filename="boolean" code-line-numbers="1-2|4-5"}
so_true = True
Expand Down Expand Up @@ -169,7 +160,7 @@ upper_case = my_str.upper()
:::


# Strings: Knowledge Check
# Strings: Intuition Check

What do these methods do?

Expand All @@ -179,8 +170,8 @@ What do these methods do?
```{.python filename="strings" code-line-numbers="1|3|4"}
my_str = "a farewell to arms"
print(my_str.title())
print(my_str.startswith("a"))
my_str.title()
my_str.startswith("a")
```
:::

Expand Down Expand Up @@ -210,6 +201,7 @@ concated = [1, 2, 3] + [4, 5, 6]

- Lists support iteration.

<br>

:::{.fragment}
```{.python filename="lists" code-line-numbers="1|3-4"}
Expand All @@ -220,6 +212,10 @@ for word in some_phrase:
```
:::

::: footer
Don't recognize the text? See [here](https://www.youtube.com/watch?v=WiP0IuGFV4c)
:::


# Lists: Knowledge Check

Expand Down

0 comments on commit d8fc251

Please sign in to comment.