Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def dog_walk(x, y, say="", speed="normal"):
- print(f"Dog {speed} walk to point ({x}, {y})", end=" ")
- if say:
- print(f"and say '{say}'", end=" ")
- print()
- dog_walk(0, 0)
- # Dog normal walk to point (0, 0)
- dog_walk(0, 0, "Wuf!")
- # Dog normal walk to point (0, 0) and say 'Wuf!'
- dog_walk(0, 0, "Wuf!", "slow")
- # Dog slow walk to point (0, 0) and say 'Wuf!'
- dog_walk(0, 0, speed="fast")
- # Dog fast walk to point (0, 0)
- dog_walk(say="I am a WULF!", x=100, y=500)
- # Dog normal walk to point (100, 500) and say 'I am a WULF!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement