GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dock test · morristech/StarterLearningPython@a158909

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • newcodes
    • docktest.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎newcodes/docktest.py‎

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class Cat:
2+
def speak(self):
3+
print("meow!")
4+
5+
class Dog:
6+
def speak(self):
7+
print("woof!")
8+
9+
class Bob:
10+
def bow(self):
11+
print("thank you, thank you!")
12+
def speak(self):
13+
print("hello, welcome to the neighborhood!")
14+
def drive(self):
15+
print("beep, beep!")
16+
17+
def command(pet):
18+
pet.speak()
19+
20+
pets = [ Cat(), Dog(), Bob() ]
21+
22+
for pet in pets:
23+
command(pet)

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.