@@ -83,9 +83,9 @@ print(result)
8383::: {.incremental .fade style="margin-top: -0.25em; font-size: 0.8em;"}
8484
8585- Calling the ` create_greeting ` function causes each line to run sequentially
86- - First: concatenate name with "Hello, " and "!"
87- - Second: add the welcome message to create full greeting
88- - Third: return the complete message to caller
86+ - ** First** : concatenate name with ` "Hello, " ` and ` "!" `
87+ - ** Second** : add the welcome message to create full greeting
88+ - ** Third** : return the complete message to caller
8989- ** Document connection** : generating personalized content for reports!
9090
9191:::
@@ -144,30 +144,29 @@ print(counts)
144144# Collections contain multiple values
145145
146146::: {.fragment .fade-right}
147- - {{< iconify fa6-solid lightbulb >}} ** Strings** : ` str ` in Python
148- - {{< iconify fa6-solid lightbulb >}} ** Lists** : ` list ` in Python
149- - {{< iconify fa6-solid lightbulb >}} ** Tuples** : ` tuple ` in Python
150- - {{< iconify fa6-solid lightbulb >}} ** Dictionaries** : ` dict ` in Python
151- - {{< iconify fa6-solid lightbulb >}} ** Sets** : ` set ` in Python
147+ - {{< iconify fa6-solid font >}} ** Strings** : ` str ` in Python
148+ - {{< iconify fa6-solid bars >}} ** Lists** : ` list ` in Python
149+ - {{< iconify fa6-solid link >}} ** Tuples** : ` tuple ` in Python
150+ - {{< iconify fa6-solid table >}} ** Dictionaries** : ` dict ` in Python
151+ - {{< iconify fa6-solid tags >}} ** Sets** : ` set ` in Python
152152:::
153153
154154::: {.fragment .fade-up style="margin-top: -0.5em;"}
155- Let's explore each of these in greater detail!
155+ ** Let's explore each of these in greater detail!**
156156:::
157157
158158## Creating and using a string
159159
160160``` {pyodide}
161161#| autorun: true
162162#| max-lines: 5
163- # strings store text data - perfect for documents!
164163title = "Document Engineering: "
165164subtitle = "A Beginner's Guide"
166165full_title = title + subtitle
166+ page_number = str(42)
167167print("Title type:", type(full_title))
168168print("Full title:", full_title)
169169print("Character at position 9:", full_title[9])
170- page_number = str(42)
171170print("Page as string:", page_number[0])
172171```
173172
@@ -177,15 +176,14 @@ print("Page as string:", page_number[0])
177176- What is the purpose of the ` full_title[9] ` notation?
178177- What is the purpose of the ` str ` function?
179178- What is the purpose of the ` + ` operator?
180- - ** Document connection** : combining text for titles and content!
181179
182180:::
183181
184182## Creating and using a list
185183
186184``` {pyodide}
187185#| autorun: true
188- #| max-lines: 12
186+ #| max-lines: 8
189187# lists store multiple items - great for document sections!
190188chapters = ["Introduction", "Basics", "Advanced", "Conclusion"]
191189print("List type:", type(chapters))
@@ -218,14 +216,13 @@ print("Document format:", doc_info[3])
218216print("Page count:", doc_info[4])
219217```
220218
221- ::: {.fragment .fade-up style="margin-top: -0.1em; font-size: 0.87em ;"}
219+ ::: {.fragment .fade-up style="margin-top: -0.1em; font-size: 0.8em ;"}
222220
221+ - A ` tuple ` is an immutable collection of ordered values
223222- What are some invalid operations on a ` tuple ` ?
224223 - ` doc_info[3] = "DOCX" `
225224 - ` doc_info.append("English") `
226225 - ` doc_info.remove("PDF") `
227- - ` doc_info.insert("HTML") `
228- - ` doc_info.pop() `
229226- ** Document connection** : storing fixed document properties!
230227
231228:::
0 commit comments