fix 'str object has no attribute isin' error #6
|
@ -18,10 +18,10 @@ def stir(potion, direction):
|
||||||
direction : {'clockwise', 'anti-clockwise'} str
|
direction : {'clockwise', 'anti-clockwise'} str
|
||||||
The direction in which the potions is to be stirred
|
The direction in which the potions is to be stirred
|
||||||
"""
|
"""
|
||||||
if direction.isin(["clockwise", "clock_wise", "clock-wise"]):
|
if direction in ["clockwise", "clock_wise", "clock-wise"]:
|
||||||
potion.colour = "vomit-yellow"
|
potion.colour = "vomit-yellow"
|
||||||
print('Your potion turns a revolting vomit-yellow.')
|
print('Your potion turns a revolting vomit-yellow.')
|
||||||
elif direction.isin(["anti-clockwise", "anticlockwise", "anti_clock_wise", "anti-clock-wise"]):
|
elif direction in ["anti-clockwise", "anticlockwise", "anti_clock_wise", "anti-clock-wise"]:
|
||||||
potion.colour = "newt-green"
|
potion.colour = "newt-green"
|
||||||
print('Your potion turns a lovely newt-green.')
|
print('Your potion turns a lovely newt-green.')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue