I want to convert the film_name parameter to lowercase using the lower() method. This ensures that the function can perform a case-insensitive search when checking if the film is a winner.
I tried the following:
def won_golden_globe(film_name):
golden_globes = ["Jaws", "Star Wars: Episode IV - A New Hope", "E.T. the Extra-Terrestrial", "Memoirs of a Geisha"]
film_name==film_name.lower()
while film_name or film_name.lower in golden_globes:
return True
else:
return False
z= won_golden_globe("jaws")
print (z)
I expected that it would print "True", it printed "False" instead
You should store the movie names as lowercase, or also transform it to lower.
There are 2 little problem with your code:
Here is the corrected code:
I hope it helps.