fix 'str object has no attribute isin' error #6

Open
annasz wants to merge 1 commit from annasz/2024-heraklion-ODD:expert_potion into main

View file

@ -18,10 +18,10 @@ def stir(potion, direction):
direction : {'clockwise', 'anti-clockwise'} str
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"
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"
print('Your potion turns a lovely newt-green.')
else: