Commit 1a7c06b
committed
Add why_we_use_types_exercise1.py with type behavior demonstration
- Create exercise file demonstrating why type hints matter
- Include half(), double(), and second() functions
- Add example showing string multiplication vs numeric multiplication
- Document expected behavior: double("22") returns "2222" due to string repetition
- Include question and answer explaining the type-dependent behavior1 parent 2fc8ae2 commit 1a7c06b
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments