Spaces:
Running
Running
Akshay Agrawal
commited on
Commit
Β·
731f48e
1
Parent(s):
e7f5780
capitalization
Browse files- python/001_numbers.py +6 -6
- python/002_strings.py +1 -1
- python/003_collections.py +2 -2
- python/004_conditional_logic.py +6 -6
- python/005_loops.py +1 -1
- python/007_advanced_collections.py +2 -2
python/001_numbers.py
CHANGED
@@ -15,7 +15,7 @@ app = marimo.App()
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
-
# π’ Numbers
|
19 |
|
20 |
This tutorial provides a brief overview of working with numbers.
|
21 |
|
@@ -45,7 +45,7 @@ def _():
|
|
45 |
def _(mo):
|
46 |
mo.md(
|
47 |
"""
|
48 |
-
## Basic
|
49 |
|
50 |
Python supports all standard mathematical operations.
|
51 |
|
@@ -107,7 +107,7 @@ def _(number):
|
|
107 |
def _(mo):
|
108 |
mo.md(
|
109 |
"""
|
110 |
-
## Type
|
111 |
|
112 |
You can convert between different number types. Try changing these values!
|
113 |
"""
|
@@ -137,7 +137,7 @@ def _(number):
|
|
137 |
def _(mo):
|
138 |
mo.md(
|
139 |
"""
|
140 |
-
## Built-in
|
141 |
Python provides many useful built-in functions for working with numbers:
|
142 |
"""
|
143 |
)
|
@@ -172,7 +172,7 @@ def _():
|
|
172 |
def _(mo):
|
173 |
mo.md(
|
174 |
"""
|
175 |
-
## Advanced
|
176 |
|
177 |
For more complex mathematical operations, use Python's [math module](https://docs.python.org/3/library/math.html).
|
178 |
"""
|
@@ -225,7 +225,7 @@ def _(math):
|
|
225 |
@app.cell(hide_code=True)
|
226 |
def _(mo):
|
227 |
mo.md("""
|
228 |
-
## Next
|
229 |
|
230 |
- Practice different mathematical operations
|
231 |
- Experiment with type conversions
|
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
+
# π’ Numbers
|
19 |
|
20 |
This tutorial provides a brief overview of working with numbers.
|
21 |
|
|
|
45 |
def _(mo):
|
46 |
mo.md(
|
47 |
"""
|
48 |
+
## Basic mathematical operations
|
49 |
|
50 |
Python supports all standard mathematical operations.
|
51 |
|
|
|
107 |
def _(mo):
|
108 |
mo.md(
|
109 |
"""
|
110 |
+
## Type conversion
|
111 |
|
112 |
You can convert between different number types. Try changing these values!
|
113 |
"""
|
|
|
137 |
def _(mo):
|
138 |
mo.md(
|
139 |
"""
|
140 |
+
## Built-in math functions
|
141 |
Python provides many useful built-in functions for working with numbers:
|
142 |
"""
|
143 |
)
|
|
|
172 |
def _(mo):
|
173 |
mo.md(
|
174 |
"""
|
175 |
+
## Advanced operations
|
176 |
|
177 |
For more complex mathematical operations, use Python's [math module](https://docs.python.org/3/library/math.html).
|
178 |
"""
|
|
|
225 |
@app.cell(hide_code=True)
|
226 |
def _(mo):
|
227 |
mo.md("""
|
228 |
+
## Next steps:
|
229 |
|
230 |
- Practice different mathematical operations
|
231 |
- Experiment with type conversions
|
python/002_strings.py
CHANGED
@@ -147,7 +147,7 @@ def _(my_name):
|
|
147 |
def _(mo):
|
148 |
mo.md(
|
149 |
"""
|
150 |
-
## Working with
|
151 |
You can access any part of a string using its position (index):
|
152 |
"""
|
153 |
)
|
|
|
147 |
def _(mo):
|
148 |
mo.md(
|
149 |
"""
|
150 |
+
## Working with parts of strings
|
151 |
You can access any part of a string using its position (index):
|
152 |
"""
|
153 |
)
|
python/003_collections.py
CHANGED
@@ -44,7 +44,7 @@ def _():
|
|
44 |
def _(mo):
|
45 |
mo.md(
|
46 |
"""
|
47 |
-
## List
|
48 |
|
49 |
Here are common operations you can perform on lists.
|
50 |
|
@@ -190,7 +190,7 @@ def _():
|
|
190 |
def _(mo):
|
191 |
mo.md(
|
192 |
"""
|
193 |
-
## Collection
|
194 |
|
195 |
Here are some common operations across collections:
|
196 |
|
|
|
44 |
def _(mo):
|
45 |
mo.md(
|
46 |
"""
|
47 |
+
## List operations
|
48 |
|
49 |
Here are common operations you can perform on lists.
|
50 |
|
|
|
190 |
def _(mo):
|
191 |
mo.md(
|
192 |
"""
|
193 |
+
## Collection methods and operations
|
194 |
|
195 |
Here are some common operations across collections:
|
196 |
|
python/004_conditional_logic.py
CHANGED
@@ -15,7 +15,7 @@ app = marimo.App()
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
-
# π Conditional
|
19 |
|
20 |
This tutorial teaches you how to how to make **decisions** in your code, using
|
21 |
Python's conditional statements.
|
@@ -80,7 +80,7 @@ def _(mo, number):
|
|
80 |
def _(mo):
|
81 |
mo.md(
|
82 |
r"""
|
83 |
-
### Interactive
|
84 |
**Try it!** Try changing the conditions below and see how the results change:
|
85 |
"""
|
86 |
)
|
@@ -125,7 +125,7 @@ def _(mo, threshold, value):
|
|
125 |
def _(mo):
|
126 |
mo.md(
|
127 |
r"""
|
128 |
-
## Boolean
|
129 |
Python uses boolean operators to combine conditions:
|
130 |
|
131 |
- `and`: Both conditions must be True
|
@@ -167,7 +167,7 @@ def _(age, has_id, mo):
|
|
167 |
can_vote = age.value >= 18 and has_id.value
|
168 |
|
169 |
explanation = f"""
|
170 |
-
### Voting
|
171 |
|
172 |
Current Status:
|
173 |
|
@@ -210,7 +210,7 @@ def _():
|
|
210 |
def _(mo):
|
211 |
mo.md(
|
212 |
"""
|
213 |
-
## Complex
|
214 |
Combine multiple conditions for more sophisticated logic:
|
215 |
```python
|
216 |
# Multiple conditions
|
@@ -267,7 +267,7 @@ def _(humidity, mo, temp, wind):
|
|
267 |
conditions = get_weather_advice()
|
268 |
|
269 |
message = f"""
|
270 |
-
### Weather
|
271 |
|
272 |
Current Conditions:
|
273 |
|
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
+
# π Conditional logic
|
19 |
|
20 |
This tutorial teaches you how to how to make **decisions** in your code, using
|
21 |
Python's conditional statements.
|
|
|
80 |
def _(mo):
|
81 |
mo.md(
|
82 |
r"""
|
83 |
+
### Interactive decision making
|
84 |
**Try it!** Try changing the conditions below and see how the results change:
|
85 |
"""
|
86 |
)
|
|
|
125 |
def _(mo):
|
126 |
mo.md(
|
127 |
r"""
|
128 |
+
## Boolean operations
|
129 |
Python uses boolean operators to combine conditions:
|
130 |
|
131 |
- `and`: Both conditions must be True
|
|
|
167 |
can_vote = age.value >= 18 and has_id.value
|
168 |
|
169 |
explanation = f"""
|
170 |
+
### Voting eligibility check
|
171 |
|
172 |
Current Status:
|
173 |
|
|
|
210 |
def _(mo):
|
211 |
mo.md(
|
212 |
"""
|
213 |
+
## Complex conditions
|
214 |
Combine multiple conditions for more sophisticated logic:
|
215 |
```python
|
216 |
# Multiple conditions
|
|
|
267 |
conditions = get_weather_advice()
|
268 |
|
269 |
message = f"""
|
270 |
+
### Weather analysis
|
271 |
|
272 |
Current Conditions:
|
273 |
|
python/005_loops.py
CHANGED
@@ -15,7 +15,7 @@ app = marimo.App()
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
-
# π Loops
|
19 |
|
20 |
Let's learn how Python helps us repeat tasks efficiently with loops.
|
21 |
|
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
+
# π Loops
|
19 |
|
20 |
Let's learn how Python helps us repeat tasks efficiently with loops.
|
21 |
|
python/007_advanced_collections.py
CHANGED
@@ -15,7 +15,7 @@ app = marimo.App()
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
-
# π Advanced
|
19 |
|
20 |
This tutorials hows advanced patterns for working with collections.
|
21 |
|
@@ -66,7 +66,7 @@ def _(users_data):
|
|
66 |
def _(mo):
|
67 |
mo.md(
|
68 |
"""
|
69 |
-
## Nested
|
70 |
|
71 |
Python collections can be nested in various ways to represent complex data:
|
72 |
"""
|
|
|
15 |
def _(mo):
|
16 |
mo.md(
|
17 |
"""
|
18 |
+
# π Advanced collections
|
19 |
|
20 |
This tutorials hows advanced patterns for working with collections.
|
21 |
|
|
|
66 |
def _(mo):
|
67 |
mo.md(
|
68 |
"""
|
69 |
+
## Nested data structures
|
70 |
|
71 |
Python collections can be nested in various ways to represent complex data:
|
72 |
"""
|