|
386 | 386 | "cell_type": "markdown", |
387 | 387 | "metadata": {}, |
388 | 388 | "source": [ |
389 | | - "## Object Assignments\n", |
| 389 | + "## Variable Assignments\n", |
390 | 390 | "\n", |
391 | | - "Now that we've seen how to use numbers in Python as a calculator let's see how we can assign names and create objects.\n", |
| 391 | + "Now that we've seen how to use numbers in Python as a calculator let's see how we can assign names and create variables.\n", |
392 | 392 | "\n", |
393 | | - "We use a single equals sign to assign names to objects. Let's see a few examples of how we can do this." |
| 393 | + "We use a single equals sign to assign labels to variables. Let's see a few examples of how we can do this." |
394 | 394 | ] |
395 | 395 | }, |
396 | 396 | { |
|
481 | 481 | "cell_type": "markdown", |
482 | 482 | "metadata": {}, |
483 | 483 | "source": [ |
484 | | - "Yes! Python allows you to write over assigned object names. We can also use the objects themselves when doing the reassignment. Here is an example of what I mean:" |
| 484 | + "Yes! Python allows you to write over assigned variable names. We can also use the variables themselves when doing the reassignment. Here is an example of what I mean:" |
485 | 485 | ] |
486 | 486 | }, |
487 | 487 | { |
|
546 | 546 | "cell_type": "markdown", |
547 | 547 | "metadata": {}, |
548 | 548 | "source": [ |
549 | | - "The names you use when creating these objects need to follow a few rules:\n", |
| 549 | + "The names you use when creating these labels need to follow a few rules:\n", |
550 | 550 | "\n", |
551 | 551 | " 1. Names can not start with a number.\n", |
552 | 552 | " 2. There can be no spaces in the name, use _ instead.\n", |
553 | 553 | " 3. Can't use any of these symbols :'\",<>/?|\\()!@#$%^&*~-+\n", |
554 | 554 | " 3. It's considered best practice (PEP8) that the names are lowercase.\n", |
555 | 555 | "\n", |
556 | | - "Using object names can be a very useful way to keep track of different variables in Python. For example:" |
| 556 | + "Using variable names can be a very useful way to keep track of different variables in Python. For example:" |
557 | 557 | ] |
558 | 558 | }, |
559 | 559 | { |
|
599 | 599 | "cell_type": "markdown", |
600 | 600 | "metadata": {}, |
601 | 601 | "source": [ |
602 | | - "So what have we learned? We learned some of the basics of numbers in Python. We also learned how to do arithmetic and use Python as a basic calculator. We then wrapped it up with learning about Object Assignment in Python.\n", |
| 602 | + "So what have we learned? We learned some of the basics of numbers in Python. We also learned how to do arithmetic and use Python as a basic calculator. We then wrapped it up with learning about Variable Assignment in Python.\n", |
603 | 603 | "\n", |
604 | 604 | "Up next we'll learn about Strings!" |
605 | 605 | ] |
|
0 commit comments