⚑ IT Wisdom I told my team to implement TLS everywhere. They added it to the coffee machine. I regret nothing.
Skilled Practitioner
4249 XP 1751 to Expert
Objective: Use if/elif/else to identify a device type from its hostname prefix.
Instructions

Open python3 in your terminal. Run the code block below exactly as written β€” paste it all in at once or line by line:

hostname = "sw-core-01"
if hostname.startswith("sw"):
    print("Cisco Switch")
elif hostname.startswith("rtr"):
    print("Router")
elif hostname.startswith("fw"):
    print("Firewall")
else:
    print("Unknown")

Paste the single line of output below and submit.

πŸ’‘ Show Hint
The hostname starts with "sw" so the first condition matches. Python runs that branch and skips the rest.
Paste Your Output
Next Lab β†’