• This script checks three VLAN numbers, so the same test is written three times:

    data_vlan = 20
    voice_vlan = 60
    guest_vlan = 5000
    
    print(data_vlan >= 1 and data_vlan <= 4094)
    print(voice_vlan >= 1 and voice_vlan <= 4094)
    print(guest_vlan >= 1 and guest_vlan <= 4094)

    A function gives a name to these lines.
    You define them once with def, then you use the name each time:

    The lines def is_valid(vlan_id): and return vlan_id >= 1 and vlan_id <= 4094 are the definition, where the test is written once, and the three lines print(is_valid(...)) are the calls, where you use the function by its name.

    Figure 1 - A Function Is Written Once and Used by Its Name

    The lines of the function start with four spaces like with if.

    In the lab, the function is_access_port is already written, but the script does not use it.
    Use it for the three ports, then make it accept the ports up to 46 to get the flag.

    Answer the question below

    Enter the flag you obtained.