Tell us what’s happening:
i cant pass Q.7 - Q.9,
on the line 11 : i tried using (name == ‘’) instead of (len(name) == 0) but the result still same, can you tell me what did i do wrong ?
Your code so far
class Planet:
def __init__(self, name, planet_type, star):
self.name = name
self.planet_type = planet_type
self.star = star
if not isinstance(name, str) or isinstance(planet_type, str) or isinstance(star, str):
raise TypeError('name, planet type, and star must be strings')
if len(name) == 0 or len(planet_type) == 0 or len(star) == 0:
raise ValueError('name, planet_type, and star must be non-empty strings')
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:156.0) Gecko/20100101 Firefox/156.0
Challenge Information:
Build a Planet Class - Build a Planet Class
