Exemplo n.º 1
0
def ab_ae_UDV_vs_TCP():
    correct = (
        "UDP is faster at transmitting data than TCP",
        "TCP is slower at transmitting data than UDP",
        "TCP provides better data integrity than UDP", 
        "UDP us better for online gaming applications", 
        "UDP is better for livestreaming applications", 
        "TCP is better for sending files", 
        "TCP and UDP are suited to different purposes", 
        "UDP is faster than TCP",
    )
    incorrect = (
        "UDP is slower at transmitting data than TCP",
        "TCP is faster at transmitting data than UDP",
        "UDP provides better data integrity than TCP", 
        "TCP us better for online gaming applications", 
        "TCP is better for livestreaming applications", 
        "UDP is better for sending files", 
        "TCP is better than UDP because it is more reliable",
        "UDP is better than TCP because it is more reliable", 
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
Exemplo n.º 2
0
def ab_af_IP_sockets():
    correct = (
        "a server socket consists of a server IP address, protocol and a server application port number", 
        "a client socket consists of a client IP address, protocol and a client application port number", 
        "a socket includes an IP address, protocol and a port number",
        "a socket includes, among other things, an IP address",
        "a socket includes, among other things, protocol",
        "a socket includes, among other things, a port number",
    )
    incorrect = (
        "a client socket consists of a server IP address, protocol and a server application port number", 
        "a server socket consists of a client IP address, protocol and a client application port number", 
        "a socket includes an IP address, protocol and HTTP",
        "a socket includes an IP address, SSL and a port number",
        "a socket includes an IDSN address, protocol and a port number",
        "a socket includes, among other things a VIN number,",
        "a socket includes, among other things, ethernet connectors",
        "a socket includes, among other things, an RJ45 connector",
        "a socket includes, among other things, an antivirus check",    
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
Exemplo n.º 3
0
def ab_ad_user_datagram_protocol():
    correct = (
        "UDP is described as unreliable",
        "UDP is connectionless",
        "UDP does not require a formal open or close to the connection",
        "UDP does not allow error recovery",
        "UDP does not allow reordering of data",
        "UDP does not manage retransmissions",
        "UDP enables the sender to determine the amount of data transmitted",
        "UDP is suited to streaming data",
        "UDP is suited for online gaming",
        "UDP is suited to watching content live",  
    )
    incorrect = (
        "UDP is described as reliable",
        "UDP is connection oriented",
        "UDP requires a formal open or close to the connection",
        "UDP allows error recovery",
        "UDP allowS reordering of data",
        "UDP manages retransmissions",
        "UDP enables the reciever to determine the amount of data transmitted",
        "UDP is suited to transmitting files",
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
def ad_ab_cloud_services():
    items = (
        ("use a web-based calendar application", "SaaS"),
        ("use a remote server owned by another firm", "IaaS"),
        ("gain access to detailed weather statistics for the past 100 years through the cloud",
         "DaaS"),
        ("use a cloud based software development and deployment environment",
         "PaaS"),
    )
    fillers = (
        'SPSS',
        'SQL',
        'MS',
        'Azure',
        'AWS',
        'Isaac',
        'Pass',
    )
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1,
                            randint(4, 7))
        q.questionBase = f"An {q.item(vl.users)} has signed up to {items[q.choice][0]}. Which of the following solutions has the user purchased?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(2, 4), randint(4, 7))
        q.questionBase = f"Match the following descriptions with their respective services:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ad")
    return q.returnAll()
Exemplo n.º 5
0
def ab_ab_Network_payloads():
    correct = (
        "the ethernet payload is contained between an ethernet header and an ethernet trailer",
        "the ethernet payload consists of an IP header followed by an IP payload",
        "the IP payload consists of a TCP header followed by a TCP payload",
        "the TCP payload is often HTTP data",
    )
    incorrect = (
        "the ethernet payload is contained between a TCP header and a TCP trailer",
        "the ethernet payload consists of an HTTP header followed by an IP payload",
        "the IP payload consists of an ethernet header followed by an IP payload",
        "the TCP payload is often IP data",
        "the ethernet payload is contained between a HTML header and a HTML trailer",
        "the ethernet payload consists of an HTTP header followed by a TCP payload",
        "the IP payload consists of an ethernet header followed by an SMTP payload",
        "the TCP payload is always POP3 data",
    )
    number = randint(1,3)
    mod_name = cf.currentFuncName()
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
def ac_ab_ethernet_cables_dr():
    items = (
        ('used for data networks employing frequencies up to 16 MHz with up to 10 Mbps Ethernet networks',
         'Cat 3'),
        ('allows data transmission over Ethernet at 100 Mbit/s and above at 100 MHz, uses twisted pairs',
         'Cat 5'),
        ('allows data transmission over Ethernet at 125 Mbit/s and above at 100 MHz, uses twisted pairs',
         'Cat 5e'),
        ('ethernet cable containing shield protected twisted pair wires, supports speeds of up to 1 Gb/s at up to 250 MHz, up to 55 meters',
         'Cat 6'),
        ('well protected, but less flexible, supports speeds of up to 10 Gb/s at 500 MHz, over 55 meters',
         'Cat 6A'),
        ('comprises four individually shielded pairs inside an overall shield, transmission of 10 Gb/s at 600 Mhz up to 15m',
         'Cat 7'),
        ('shielded cable allowing data transmission over Ethernet at 25 Gb/s at 2 Ghz',
         'Cat 8'),
    )
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, (), 1, 1, randint(4, 6))
        q.questionBase = f"Which of the following fits the following description at the lowest cost: {items[q.choice][0]}"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, (), 1, randint(3, 5),
                            randint(5, 7))
        q.questionBase = f"Match the descriptions of different types with Ethernet cable with their names."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
Exemplo n.º 7
0
def ab_ac_transmission_control_protocol(): 
    correct = (
        "TCP is described as reliable",
        "TCP is connection oriented",
        "TCP requires a formal connection setup and close",
        "TCP can manage messages out of sequence",
        "TCP can manage retransmissions",
        "TCP allows the reciever to manage how much data is sent",
        "TCP enables recovery from eroneous transmissions",
        "TCP is suited to sending files",
    )
    incorrect = (
        "TCP is described as unreliable",
        "TCP is connectionless",
        "TCP does not require a formal connection setup and close",
        "TCP does not manage messages out of sequence",
        "TCP does not manage retransmissions",
        "TCP allows the sender to manage how much data is sent",
        "TCP is suited to steaming",
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
Exemplo n.º 8
0
def ab_al_client_server_ports():
    pplist = ports_protocols()[:-4]
    itemnos = {randint(0,len(pplist)-1)}
    while len(itemnos) != 10:
        itemnos.add(randint(0,len(pplist)-1))
    items = [pplist[i] for i in itemnos]
    right = []
    for i in range(5):
        right.append(items.pop(randint(0,len(items)-1)))
    correct = []
    for item in right:
        correct.append(f'From source port {randint(1024, 65535)} to destination {item[0]} to {item[3]} ({item[2]})')
    incorrect = []
    item = items.pop()
    incorrect.append(f'From source port {randint(1024, 65535)} to destination {randint(1024, 65535)} to {item[3]} ({item[2]})')
    incorrect.append(f'From source port {randint(1024, 65535)} to destination {randint(1024, 65535)} to {item[3]} ({item[2]})')
    incorrect.append(f'From source port {item[0]} to destination {item[0]} to {item[3]} ({item[2]})')
    incorrect.append(f'From source port {item[0]} to destination {item[0]} to {item[3]} ({item[2]})')
    incorrect.append(f'From source port {item[0]} to destination {randint(1024, 65535)} to {item[3]} ({item[2]})')
    mod_name = cf.currentFuncName()
    number = randint(1,4)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(6,7))
        q.questionBase = f"Identify valid source (client) and destination (server) port configurations:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(6,7))
        q.questionBase = f"Identify valid source (client) and destination (server) port configurations:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
Exemplo n.º 9
0
def ab_ah_ephemeral_and_non_ephemeral_ports():
    noneph = randint(0, 1023)
    eph = randint(1024, 65535) 
    correct = (
        "non-ephemeral ports are fixed",
        "non-ephemeral ports are usually linked to a server or service",
        "ephemeral ports are temporary",
        "ephemeral ports are assigned in real time by a client",
        "ports 0-1023 are usually non-ephemeral",  
        "ports 1024-65535 are usually ephemeral",
        f"tcp/{eph} is an ephemeral port",
        f"udp/{eph} is an ephemeral port",
        f"tcp/{noneph} is a non-ephemeral port",
        f"udp/{noneph} is a non-ephemeral port",
    )
    incorrect = (
        "ephemeral ports are fixed",
        "ephemeral ports are usually linked to a server or service",
        "non-ephemeral ports are temporary",
        "non-ephemeral ports are assigned in real time by a client",
        f"tcp/{eph} is a non-ephemeral port",
        f"udp/{eph} is a non-ephemeral port",
        f"tcp/{noneph} is an ephemeral port",
        f"udp/{noneph} is an ephemeral port",
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
def ac_aa_coaxial_cables_termination_mc():
    correct = ("RG-59", )
    incorrect = ("DB9", "RJ45", "RS-232")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1, 4)
    q.questionBase = "Which of the following terminates a coaxial cable?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ach1_custom_power_mc():
    correct = ("Input voltage", )
    incorrect = ("Efficiency rating", "12V rail amperage",
                 "Number of SATA connectors")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1, 4)
    q.questionBase = f"A technician is determining the specifications for a desktop computer that will be used at trade shows all over the world. The computer will have the maximum amount of RAM. The CPU, GPU, and storage will be typical of a business workstation. Which of the following system parameters is the MOST important for the technician to consider when choosing a power supply?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_fa_inventory_update_tags_mc():
    correct = ("Barcode scanner", "Magnetic Reader")
    incorrect = ("Label printer", "KVM switch", "NFC device",
                 "Flatbed scanner", "Webcam", "CMOS")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 2,
                        randint(4, 6))
    q.questionBase = f"Which of the following peripherals would a {q.item(vl.businesses)} company use to take inventory quickly and update price tags for products? (Choose two.)"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ach2_intermediate_use_gaming_mc():
    correct = ("Four-core processor", "16GB DDR3 memory")
    incorrect = ("80mm case fans", "12V rail amperage",
                 "Number of SATA connectors", "RAID 5 array",
                 "Encrypted hard drive")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 2,
                        randint(5, 7))
    q.questionBase = f"A {q.item(vl.users)} wants to purchase a new home computer. The machine will mainly be used for {q.item(vl.online_activities)}, except on weekends when the customer’s {q.item(vl.relations)} will use it to play games with friends. Which of the following should the technician focus on to meet these requirements? (Choose two)"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_ca_ram_upgrade():
    items = (
        ('A server needs a RAM upgrade', 'DDR'),
        ('A laptop needs a RAM upgrade', 'SoDIMM'),
        ('The RAM in a router is faulty', 'SRAM'),
        ('Imagine that the RAM on a graphics card exploded', 'GDDR SDRAM'),
    )
    q = cf.SelectMcDrag(None, None, None, items, (), 1, 1, 4)
    q.questionBase = f"{items[q.choice][0]}, and a {q.item(vl.technitians)} technician has been tasked with retrieving the RAM from storage and then installing it. Which of the following is the BEST RAM type for the technician to retrieve?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_ha_custom_video_editing_mc():
    correct = ("SSD", "Dual monitors", "6 core processor",
               "discrete graphics card")
    incorrect = ("Gigabit NIC", "Hypervisor", "Docking station",
                 "Flatbed scanner", "Webcam", "DVD drive")
    choice = randint(1, 3)
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, choice,
                        randint(4, 6))
    q.questionBase = f"A {q.item(vl.users)} asks a {q.item(vl.users)} technician to help set up a specialized computing system for video editing. Which of the following should the technician install on the workstation to BEST meet the customer’s specifications? (Choose {choice})"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_da_storage():
    correct = ('3TB HDD', )
    incorrect = (
        '500TB SAN',
        '2GB USB drive'
        '50GB NAS',
        '512GB SSD',
    )
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1, 4)
    q.questionBase = f"A {q.item(vl.users)} wants to upgrade a PCs internal storage to have more room to store backups, photos, and videos. The newstorage should be large enough to avoid expanding again next year. Which of the following BEST meets these needs at the lowest cost?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_fb_second_laptop_screena_mc():
    correct = ('Adjust the monitor display settings.', )
    incorrect = ('Plug an external monitor into the USB port.',
                 'Use the Fn and function key combination',
                 'Enable DisplayPort', "ipconfid/display",
                 "change BIOS settings")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1,
                        randint(4, 6))
    q.questionBase = f"An {q.item(vl.users)} wants to have a second monitor installed on a laptop. Which of the following would allow a technician to configurethe laptop to show both screens once the cable is connected?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")

    return q.returnAll()
def ac_ka_trouble_printing_document_type():
    correct = (
        'Verify the user is sending the document to the correct printer queue.',
    )
    incorrect = (
        'Stop and restart the PC print spooler service.',
        'Have each user send the same document to the correct printer queue.',
        'Stop and restart the print server queues, and then have the user resend the document.',
    )
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1, 4)
    q.questionBase = f"A {q.item(vl.users)} is having a problem with printing a specific document type. The network printer OCP shows that the printer is online with no errors. Other users are not having the same issue. The usersends the document to another printer and the document prints. Which of the following should a technician do FIRST in troubleshooting the problem?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
    '''
def ack1_print_settings_mc():
    single, double = ('Simplex', ), ('Duplex', )
    other = ('Collate', 'Orientation', 'Transparency', 'Destination', 'Scale',
             'Margins')
    choice = randint(0, 1)
    if choice == 1:
        correct, incorrect, component = double, single + other, 'both the front and back sides'
    else:
        correct, incorrect, component = single, double + other, 'one side'
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1,
                        randint(4, 6))
    q.questionBase = f"A {q.item(vl.users)} wants to print a large job of {q.item(vl.printables)} on {component} of the paper. {q.item(vl.comments)} Which of the following settings should the technician advise the user to select in the printer settings?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_fc_projector_flickering():
    items = (
        ("A projector's image begins to flicker during a presentation. The laptop display does not produce this issue. When a technitian changes the resolution on the laptop, the issue persists.",
         "Check the connectivity of the VGA cable"),
        ("A projector sometimes seems to switch on and off during a presentation. The laptop is on throughout, as is the display.",
         "Check the connectivity of the power cable"),
        ("The image on a projector appears stretched, whilst the sides of the image are cut off compare to the laptop display.",
         "Change the aspect ratio on the laptop"),
    )
    fillers = ('Change the settings of the projector',
               'Clean the projector\'s lens')
    q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1, randint(4, 5))
    q.questionBase = f"{items[q.choice][0]} Which of the following is the NEXT step the technitian should take?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_ba_usb_connectors_mc():
    items = (
        ("a non-directional connector", "USB-C"),
        ("an almost square-shaped connector", "USB-B"),
        ("a rectangular shaped connector, sized 16 x 8mm", "USB-A"),
    )
    fillers = ("Micro-USB", "Mini-USB")
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1,
                            randint(4, 5))
        q.questionBase = f"Which of the following charging and data ports has a {items[q.choice][0]}?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(1, 3), 5)
        q.questionBase = "Match the descriptions of different types of USB connectors with their names."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_db_raid_solution():
    items = (
        ('want to prioritise performance due to the use of a large application with an enormous amout of data. They are prepared to accept the risk of data loss in case of failure.',
         'RAID 0'),
        ('want a fault tolerant system in case of failure, and can afford to purchase an additional storage device if needed.',
         'RAID 1'),
        ('require consistent access to all data, high reliability and performance. They can afford to purchase two additional storage devices.',
         'RAID 5'),
        ('insist on fast recovery in case of failure and high performance. Money is no object, and they can afford to purchase as many storage devices as needed.',
         'RAID 10'),
    )
    fillers = ('RAID 2', 'RAID 3', 'RAID 4', 'RAID 6', 'RAID 7', 'RAID 8',
               'RAID 9', 'RAID 11', 'RAID 15')
    q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1, randint(4, 7))
    q.questionBase = f"A {q.item(vl.technitians)} technician is talking to a {q.item(vl.users)} about the specifications for an upgraded application server. The users {items[q.choice][0]}. Which of the following solutions should the technitian recommend?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ad_aa_cloud_attributes():
    items = (
        ("allows scalable services to be provided to the client",
         "Rapid elasticity"),
        ("means that you only pay for what you use", 'Metered'),
        ("allows a user to access resources when they need them", 'On-demand'),
    )
    fillers = ('High speed', 'Mobile', 'Plasticity', 'Iconicity', 'Publicity',
               'Resource pooling')
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1, 5)
        q.questionBase = f"Which of the following terms describes how cloud computing {items[q.choice][0]}?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(1, 3), randint(4, 7))
        q.questionBase = f"Match the attributes of cloud computing with the correct descriptive terms."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ad")
    return q.returnAll()
def ad_ac_cloud_storage():
    items = (
        ("The feature that allows users to store files in cloud-based storage when necessary, but can be removed when space is freedup",
         'on-demand'),
        ("The provider's computing resources to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand,",
         'a resource pool'),
        ("Data, information or hardware devices that can be easily accessed from a remote computer",
         'shared resources'),
    )
    fillers = ('synchronization application', 'product elasticity')
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1, 4)
        q.questionBase = f"{items[q.choice][0]} is known as:"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(2, 3), randint(4, 5))
        q.questionBase = f"Match the following descriptions with their respective names:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ad")
    return q.returnAll()
def ac_ab_ethernet_cables_mc():
    items = (
        ("100 Mbit/s", "Cat 5"),
        ("125 Mbit/s", "Cat 5e"),
        ("1 Gbit/s", "Cat 6"),
        ("10 Gbit/s", "Cat 7"),
        ("25 Gbit/s", "Cat 8"),
    )
    fillers = ('Cat 3', )
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1,
                            randint(4, 6))
        q.questionBase = f"Which of the following would allow Ethernet at {items[q.choice][0]} at the lowest cost?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(3, 4), randint(5, 6))
        q.questionBase = f"Match the speeds with the ethernet cable classifications."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_ab_network_cables_and_terminations_dr():
    items = (
        ('a type of coaxial cable used for low-power video and radio frequency signal connections',
         'RG-59/U'),
        ('a connector commonly used for video output and Controller Area Network',
         'DE-9'),
        ('a connector used to terminate ethernet cable with one data ine and programming resistor',
         'RJ45'),
    )
    fillers = ('DB9', 'RS-232')
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1, 4)
        q.questionBase = f"Which of these describes {items[q.choice][0]}?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(3, 4), 5)
        q.questionBase = f"Match the descriptions with their names."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
Exemplo n.º 27
0
def ab_ag_TCP_and_UDP_port_values():
    noneph = randint(0, 1023)
    eph = randint(1024, 65535)
    ports = randint(0,65535)
    nonports = randint(65536, 100000)
    correct = (
        "ports 0-1023 are usually non-ephemeral",  
        "ports 1024-65535 are usually ephemeral",
        "TCP can use TCP ports 0-65535",
        "UDP can use UDP ports 0-65535",
        "TCP and UDP use seperate ports",
        f"tcp/{ports} is a valid port",
        f"udp/{ports} is a valid port",
        f"tcp/{nonports} is an invalid port",
        f"udp/{nonports} is an invalid port",
        f"tcp/{eph} is an ephemeral port",
        f"udp/{eph} is an ephemeral port",
        f"tcp/{noneph} is a non-ephemeral port",
        f"udp/{noneph} is a non-ephemeral port",
    )
    incorrect = (
        "UDP and TCP share ports",
        f"tcp/{ports} is an invalid port",
        f"udp/{ports} is an invalid port",
        f"tcp/{nonports} is a valid port",
        f"udp/{nonports} is a valid port",
        f"tcp/{eph} is a non-ephemeral port",
        f"udp/{eph} is a non-ephemeral port",
        f"tcp/{noneph} is an ephemeral port",
        f"udp/{noneph} is an ephemeral port",
    )
    mod_name = cf.currentFuncName()
    number = randint(1,3)
    if randint(0,1):
        q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all correct statements about {cf.underscoreless(mod_name)}:"
    else:
        q = cf.SelectMcDrag(None, incorrect, correct, None, (), 1, number, randint(4,5))
        q.questionBase = f"Choose all incorrect statements about {cf.underscoreless(mod_name)}:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), mod_name, module_path(),"ab") 
    return q.returnAll()
def ac_bb_usb_connectors_dr():
    items = (
        ('24-pin USB connector system with a rotationally symmetrical connector.',
         'USB-C'),
        ('6.85 by 1.8 mm connector intended for use with mobile devices',
         'Micro-USB'),
        ('3 by 7 mm connector intended for use with small devices',
         'Mini-USB'),
        ('16 by 8 mm with an elongated rectangular cross-section, carries both power and data',
         'USB-A'),
        ('11.5 by 10.5 mm with a near square cross-section with the top exterior corners beveled, ',
         'USB-B'),
    )
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, (), 1, 1, randint(4, 5))
        q.questionBase = f"Which of the following is a {items[q.choice][0]}?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, (), 1, randint(3, 5), 5)
        q.questionBase = "Match the descriptions of different types of USB connectors with their names."
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ac_dc_raid_description():
    items = (
        ('dividing data evenly across who or more storage devices.', 'RAID 0')(
            'simultaneously writing the same data to two storage devices.',
            'RAID 1'),
        ('dividing data evenly across three or more storage devices, with parity spread across all drives.',
         'RAID 5'),
        ('dividing data evenly across two or more devices, and duplicating the data on the same number of other devices.',
         'RAID 10'),
    )
    fillers = ('RAID 2', 'RAID 3', 'RAID 4', 'RAID 6', 'RAID 7', 'RAID 8',
               'RAID 9', 'RAID 11', 'RAID 15')
    if randint(0, 1) == 0:
        q = cf.SelectMcDrag(None, None, None, items, fillers, 1, 1,
                            randint(4, 7))
        q.questionBase = f"Which of the following options best fits this description: {items[q.choice][0]}?"
    else:
        q = cf.SelectMcDrag('drag', None, None, items, fillers, 1,
                            randint(2, 4), randint(4, 7))
        q.questionBase = f"Match the following solutions with their descriptions:"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(
        list_functions(), cf.currentFuncName(), module_path(), "ac")
    return q.returnAll()
def ae_ca_broken_display_mc():
    correct = ('Document and label the cable and screw locations',)
    incorrect = ('Replace the screen with a non-OEM', 'Update the firmware on the device before repairing it', 'Replace the screen with an OEM', 'Immediately place the screen in a container to prevent liquid crystal leakage', 'Consult colleagues for advice', 'Remove the screen and inspect connectors for faults', 'Verify the settings in IPConfig','Research the problem based on symptoms', 'Tell the user to stay off the internet', "Wait for the vendor to provide more information")
    q = cf.SelectMcDrag(None, correct, incorrect, None, (), 1, 1, randint(5,len(incorrect)))
    q.questionBase = f"A {q.item(vl.technitians)} technician is replacing a broken screen on a new company laptop but does not have repair information from the vendor. Which of the following is the BEST way to proceed?"
    q.previousQ, q.nextQ, q.currentQname, q.nextQname, q.previousQname = cf.previousNext(list_functions(), cf.currentFuncName(), module_path(),"ae")
    return q.returnAll()