Tell us what’s happening:
I am unable to pass step 5, but it passes steps 4 and 6. I have tried checking individually for each one if they are not a string instance and it still did not work. If I try passing in a non string input into each parameter one at a time it does what it is supposed to for each one, and raises the TypeError with the correct message, but still does not pass the test.
Your code so far
class Planet():
def __init__(self, name, planet_type, star):
info = {name, planet_type, star}
if any(not isinstance(i,str) for i in info):
raise TypeError("name, planet type, and star must be strings")
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Build a Planet Class - Build a Planet Class