DEVNET MODULE 1 QUESTIONS & ANSWERS
A Linux administrator is attempting to use a terminal to configure the network interface
card on a computer. The administrator receives a message that the administrator does
not have necessary permissions to perform the configuration. What should be done
prior to the configuration command?
- Identify a different network interface
- use a different user account
- use the sudo command
- change the chmod permissions on the network configuration file - Answer -use the
sudo command
A student is learning Python and is reviewing a Python script as follows:
aclNum = int(input("What is the IPv4 ACL number? ")) if aclNum >= 1 and aclNum <=
99: print("This is a standard IPv4 ACL.") elif aclNum >=100 and aclNum <= 199:
print("This is an extended IPv4 ACL.") else: print("This is not a standard or extended
IPv4 ACL.")
Under which condition will the elif statement be evaluated?
- when the input is a string
- when the input is a float number
- when the first print statement fails
- when the if statement is false - Answer -when the if statement is false
A student new to Python is working in the interactive interpreter mode. The student
issues the commands:
>>> devicenames=["RT1", "RT2", "SW1", "SW2"] >>> hostnames=devicenames +
["RT3", "SW3"] >>> del hostnames[3] >>> hostnames
What is the result?
- ['RT1', 'RT2', 'SW2', 'RT3', 'SW3']
- ['RT1', 'RT2', 'SW1', 'SW2', 'SW3']
- ['RT1', 'RT2', 'SW1', 'RT3', 'SW3']
- ['RT1', 'RT2', 'RT3', 'SW2', 'SW3'] - Answer -'RT1', 'RT2', 'SW2', 'RT3', 'SW3']
What is the output when the following code is entered into a Python program
interpreter?
[1,2,4,5] + [3,6]
- [1,2,4,5,3,6]
- [1,2,3,4,5,6]
- [12]+[9]
- [21] - Answer -[1,2,4,5,3,6]
A student new to Python is working in the interactive interpreter mode. The student
issues the command:
A Linux administrator is attempting to use a terminal to configure the network interface
card on a computer. The administrator receives a message that the administrator does
not have necessary permissions to perform the configuration. What should be done
prior to the configuration command?
- Identify a different network interface
- use a different user account
- use the sudo command
- change the chmod permissions on the network configuration file - Answer -use the
sudo command
A student is learning Python and is reviewing a Python script as follows:
aclNum = int(input("What is the IPv4 ACL number? ")) if aclNum >= 1 and aclNum <=
99: print("This is a standard IPv4 ACL.") elif aclNum >=100 and aclNum <= 199:
print("This is an extended IPv4 ACL.") else: print("This is not a standard or extended
IPv4 ACL.")
Under which condition will the elif statement be evaluated?
- when the input is a string
- when the input is a float number
- when the first print statement fails
- when the if statement is false - Answer -when the if statement is false
A student new to Python is working in the interactive interpreter mode. The student
issues the commands:
>>> devicenames=["RT1", "RT2", "SW1", "SW2"] >>> hostnames=devicenames +
["RT3", "SW3"] >>> del hostnames[3] >>> hostnames
What is the result?
- ['RT1', 'RT2', 'SW2', 'RT3', 'SW3']
- ['RT1', 'RT2', 'SW1', 'SW2', 'SW3']
- ['RT1', 'RT2', 'SW1', 'RT3', 'SW3']
- ['RT1', 'RT2', 'RT3', 'SW2', 'SW3'] - Answer -'RT1', 'RT2', 'SW2', 'RT3', 'SW3']
What is the output when the following code is entered into a Python program
interpreter?
[1,2,4,5] + [3,6]
- [1,2,4,5,3,6]
- [1,2,3,4,5,6]
- [12]+[9]
- [21] - Answer -[1,2,4,5,3,6]
A student new to Python is working in the interactive interpreter mode. The student
issues the command: