Skip to content

Commit 12da4cf

Browse files
committed
update special methods
1 parent d5beb98 commit 12da4cf

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.ipynb_checkpoints
22
/.DS_Store
33
/nbody/
4-
/06-OOP-properties_setters_getters.ipynb
4+
/06-OOP-properties_setters_getters.ipynb
5+
/00-OOP-Intro.ipynb

05-OOP-special_methods.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@
512512
},
513513
{
514514
"cell_type": "code",
515-
"execution_count": 39,
515+
"execution_count": 1,
516516
"source": [
517517
"class Vector:\n",
518518
"\n",
@@ -540,7 +540,7 @@
540540
},
541541
{
542542
"cell_type": "code",
543-
"execution_count": 40,
543+
"execution_count": 2,
544544
"source": [
545545
"v1 = Vector(1, 2)\n",
546546
"v2 = Vector(3, 4)\n",
@@ -572,7 +572,7 @@
572572
},
573573
{
574574
"cell_type": "code",
575-
"execution_count": 41,
575+
"execution_count": 3,
576576
"source": [
577577
"class Vector:\n",
578578
"\n",
@@ -603,7 +603,7 @@
603603
},
604604
{
605605
"cell_type": "code",
606-
"execution_count": 43,
606+
"execution_count": 4,
607607
"source": [
608608
"print(v1 == v2)"
609609
],
@@ -620,7 +620,7 @@
620620
},
621621
{
622622
"cell_type": "code",
623-
"execution_count": 45,
623+
"execution_count": 5,
624624
"source": [
625625
"print (v1 != v2) # Python is smart"
626626
],
@@ -658,7 +658,7 @@
658658
},
659659
{
660660
"cell_type": "code",
661-
"execution_count": 57,
661+
"execution_count": 6,
662662
"source": [
663663
"import math\n",
664664
"\n",
@@ -707,7 +707,7 @@
707707
},
708708
{
709709
"cell_type": "code",
710-
"execution_count": 58,
710+
"execution_count": 7,
711711
"source": [
712712
"v = Vector(3, 4)\n",
713713
"print(v.length())"
@@ -725,7 +725,7 @@
725725
},
726726
{
727727
"cell_type": "code",
728-
"execution_count": 61,
728+
"execution_count": 8,
729729
"source": [
730730
"v1 = (1, 2)\n",
731731
"v2 = (3, 4)\n",
@@ -757,7 +757,7 @@
757757
"orig_nbformat": 4,
758758
"language_info": {
759759
"name": "python",
760-
"version": "3.10.0",
760+
"version": "3.9.7",
761761
"mimetype": "text/x-python",
762762
"codemirror_mode": {
763763
"name": "ipython",
@@ -769,10 +769,10 @@
769769
},
770770
"kernelspec": {
771771
"name": "python3",
772-
"display_name": "Python 3.10.0 64-bit ('venv': venv)"
772+
"display_name": "Python 3.9.7 64-bit"
773773
},
774774
"interpreter": {
775-
"hash": "c38b9cfe579f9cd5b02e32305dc867d274ec6976fedcaf892f0dfa92dc619037"
775+
"hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
776776
}
777777
},
778778
"nbformat": 4,

0 commit comments

Comments
 (0)