File tree Expand file tree Collapse file tree 3 files changed +486
-2
lines changed Expand file tree Collapse file tree 3 files changed +486
-2
lines changed Original file line number Diff line number Diff line change
1
+ .ipynb_checkpoints
2
+ * /.ipynb_checkpoints
Original file line number Diff line number Diff line change 374
374
}
375
375
],
376
376
"source" : [
377
+ " # creating animal class\n " ,
377
378
" class Animal:\n " ,
378
379
" def speak(self):\n " ,
379
380
" print(\" -- This method return animal sounds --\" )\n " ,
380
- " \n " ,
381
+ " \n " ,
382
+ " # creating Dog class\n " ,
381
383
" class Dog(Animal):\n " ,
382
384
" def speak(self):\n " ,
383
385
" return 'woof!'\n " ,
384
386
" \n " ,
387
+ " # creating Cat class\n " ,
385
388
" class Cat(Animal):\n " ,
386
389
" def speak(self):\n " ,
387
390
" return 'meow!'\n " ,
388
- " \n " ,
391
+ " \n " ,
392
+ " # creating Cow class\n " ,
389
393
" class Cow(Animal):\n " ,
390
394
" def speak(self):\n " ,
391
395
" return 'moo!'\n " ,
392
396
" \n " ,
397
+ " # creating objects\n " ,
393
398
" ani_obj = Animal()\n " ,
394
399
" dog_obj = Dog()\n " ,
395
400
" cat_obj = Cat()\n " ,
You can’t perform that action at this time.
0 commit comments