Ad
Code
Diff
  • def you_are_cool(n="Taki"):
        if not isinstance(n, str):
            return "Wait, so your name ISN'T a string of text?! That's wild!"
        n = n.strip()
        if not n:
            return "There is no name, so I'm not complimenting you. LOL"
        if len(n) > 100:
            return "Man, you have an insanely long name! Do people call you by your full name or just a nickname?"
        if n.isdigit():
            return "Are you sure? That looks like a number. Unless you're secretly a robot with a numerical name!"
        return f"Hello {n}, you are very cool!"
        
    # edge case go BRRR
    • def you_are_cool(n="Taki"):
    • if not isinstance(n, str):
    • return "Wait, so your name ISN'T a string of text?! That's wild!"
    • n = n.strip()
    • if not n:
    • return "There is no name, so I'm not complimenting you. LOL"
    • elif len(n) > 100:
    • if len(n) > 100:
    • return "Man, you have an insanely long name! Do people call you by your full name or just a nickname?"
    • elif n.isdigit():
    • if n.isdigit():
    • return "Are you sure? That looks like a number. Unless you're secretly a robot with a numerical name!"
    • else:
    • return f"Hello {n}, you are very cool!"
    • return f"Hello {n}, you are very cool!"
    • # edge case go BRRR
Code
Diff
  • def you_are_cool(n="Taki"):
        if not isinstance(n, str):
            return "Wait, so your name ISN'T a string of text?! That's wild!"
        n = n.strip()
        if not n:
            return "There is no name, so I'm not complimenting you. LOL"
        elif len(n) > 100:
            return "Man, you have an insanely long name! Do people call you by your full name or just a nickname?"
        elif n.isdigit():
            return "Are you sure? That looks like a number. Unless you're secretly a robot with a numerical name!"
        else:
            return f"Hello {n}, you are very cool!"
        
    # edge case go BRRR
    • def you_are_cool(n):
    • def you_are_cool(n="Taki"):
    • if not isinstance(n, str):
    • return "Wait, so your name ISN'T a string of text?! That's wild!"
    • elif n.strip() == "":
    • n = n.strip()
    • if not n:
    • return "There is no name, so I'm not complimenting you. LOL"
    • elif len(n.strip()) > 100:
    • elif len(n) > 100:
    • return "Man, you have an insanely long name! Do people call you by your full name or just a nickname?"
    • elif n.strip().isdigit():
    • elif n.isdigit():
    • return "Are you sure? That looks like a number. Unless you're secretly a robot with a numerical name!"
    • else:
    • return "Hello " + n.strip() + ", you are very cool!"
    • return f"Hello {n}, you are very cool!"
    • # edge case go BRRR