You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,6 +248,21 @@ name = 'Liz Kaplan'
248
248
name
249
249
```
250
250
251
+
### Working with Python Variables
252
+
```python
253
+
x_float =23.23
254
+
print(x_float)
255
+
x_int =int(x_float)
256
+
print(x_int)
257
+
print(2+4)
258
+
print('123 + 234 = ', 123+234)
259
+
```
260
+
```python
261
+
print('this is me'.upper())
262
+
print('simon ortega'.endswith('ortega'))
263
+
print('nazanin'.capitalize())
264
+
```
265
+
251
266
### Summary
252
267
253
268
In this lesson, we got a taste for what makes computer programs so powerful. By using variables, we can write programs that know how to combine data. This can save us time by avoiding boring, repetitive tasks. We declare and assign a variable with the pattern of `variable = data`, and reassign a variable with the same pattern. To reference a variable, we simply type the variable's name.
0 commit comments