File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ Output:
8181Comma separated: 1,234,567.89123
8282Rounded to 2 decimals: 1234567.89
8383Scientific notation: 1.23e+06
84- Binary: 1234568 -> 100101011010000001000
85- Hexadecimal: 12d6808
84+ f strings can print() integers in hex or binary format, not floats.
85+ Hexadecimal: 1234567 -> 12d687
86+ Binary: 1234567 -> 100101101011010000111
8687```
88+ <small >(* Code correction updates on "Formatting Numbers" section, 2025-10-21 McCright* )</small >
8789
8890---
8991
@@ -291,7 +293,7 @@ Use { and } to display curly braces.
291293### 16. Lambda Functions Inside F-strings
292294
293295``` python
294- square = lambda x : x 2
296+ square = lambda x : x ** 2
295297print (f " 5 squared is { square(5 )} " )
296298```
297299
@@ -300,6 +302,7 @@ Output:
300302```
3013035 squared is 25
302304```
305+ <small >(* Code correction updates on "Lambda Functions Inside F-strings" section, 2025-10-22 McCright* )</small >
303306
304307---
305308
You can’t perform that action at this time.
0 commit comments