-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreature.py
More file actions
39 lines (33 loc) · 1.1 KB
/
creature.py
File metadata and controls
39 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
https://powcoder.com
代写代考加微信 powcoder
Assignment Project Exam Help
Add WeChat powcoder
"""
TODO: Define the Creature class, as described on page 10 of the assignment
description. You are allowed to change the scaffold somewhat to better suit
the needs of your program (change function parameters, etc.)
You are allowed to create as many methods as you feel are necessary.
"""
class Creature:
def __init__(self, name, terror_rating):
"""
TODO: Constructor; instantiates a Creature class. You may modify
this constructor so that it can receive additional arguments (or
fewer arguments).
"""
def take(self, item):
"""
TODO: A function that may be useful when a Creature TAKEs an Item
object.
"""
def drop(self, item):
"""
TODO: A function that may be useful when a Creature DROPs an Item
object.
"""
def get_terror_rating(self):
"""
TODO: Returns a Creature's terror_rating.
"""
# These methods probably aren't enough! You can create more
# methods here.