Worksheetshkhkh
Total questions: 62
Worksheet time: 32mins
print("Hello world!")
print(3+4)
What would this print?
print("3+4")
Print("Hello world!")
print("Hello" + "world" + "today")
print(Hello world!)
print(9/3)
Who developed Python Programming Language?
a) Wick van Rossum
b) Rasmus Lerdorf
c) Guido van Rossum
d) Niene Stom
Which of the following is the correct extension of the Python file?
a) .python
b) .pl
c) .py
d) .p
What will be the value of the following Python expression?
4 + 3 % 5
a) 7
b) 2
c) 4
d) 1
Which of the following is used to define a block of code in Python language?
a) Indentation
b) Key
c) Brackets
d) All of the mentioned
Which of the following character is used to give single-line comments in Python?
a) //
b) #
c) !
d) /*
What is the order of precedence in python?
a) Exponential, Parentheses, Multiplication, Division, Addition, Subtraction
b) Exponential, Parentheses, Division, Multiplication, Addition, Subtraction
c) Parentheses, Exponential, Multiplication, Division, Subtraction, Addition
d) Parentheses, Exponential, Multiplication, Division, Addition, Subtraction
Which of the following functions is a built-in function in python?
a) factorial()
b) print()
c) seed()
d) sqrt()
Which of the following is not a core data type in Python programming?
a) Tuples
b) Lists
c) Class
d) Dictionary
To add a new element to a list we use which Python command?
a) list1.addEnd(5)
b) list1.addLast(5)
c) list1.append(5)
d) list1.add(5)
What will be the output of the following Python statement?
>>>"abcd"[2:]
a) a
b) ab
c) cd
d) dc
What will be the output of the following Python code?
>>> str1 = 'hello'
>>> str2 = ','
>>> str3 = 'world'
>>> str1[-1:]
a) olleh
b) hello
c) h
d) o
What will be the output of the following Python code?
>>>str1="helloworld"
>>>str1[::-1]
a) dlrowolleh
b) hello
c) world
d) helloworld
What will be the output of the “hello” +1+2+3?
a) hello123
b) hello
c) Error
d) hello6
Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
a) 5
b) 4
c) None
d) Error
Suppose list1 is [2445,133,12454,123], what is max(list1)?
a) 2445
b) 133
c) 12454
d) 123
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?
a) [2, 33, 222, 14]
b) Error
c) 25
d) [25, 14, 222, 33, 2]
If a=(1,2,3,4), a[1:-1] is _________
a) Error, tuple slicing doesn’t exist
b) [2,3]
c) (2,3,4)
d) (2,3)
Which of the following statements create a dictionary?
a) d = {}
b) d = {“john”:40, “peter”:45}
c) d = {40:”john”, 45:”peter”}
d) All of the mentioned
What will be the output of the following Python code snippet?
d = {"john":40, "peter":45}
d["john"]
a) 40
b) 45
c) “john”
d) “peter”
What will be the output of the following Python code?
a={1:"A",2:"B",3:"C"}
b={4:"D",5:"E"}
a.update(b)
print(a)
a) {1: ‘A’, 2: ‘B’, 3: ‘C’}
b) Method update() doesn’t exist for dictionaries
c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}
d) {4: ‘D’, 5: ‘E’}
Which of the following switch port modes will successfully form a trunk between two switches? (choose four)
Dynamic desirable – dynamic auto
Trunk – dynamic desirable
Access – dynamic auto
Trunk - trunk
Trunk – dynamic auto
Your Cisco IOS router is acting as a DHCP server.
Which command will display the addresses that have been handed out to clients on the LAN?
show ip dhcp assignments
show ip dhcp address
show ip dhcp conflicts
show ip dhcp bindings
show ip dhcp pool
Which commands will successfully create VLAN 5 and name it SALES on a Catalyst IOS switch?
Switch(config)#vlan 5
Switch(config-vlan)#name SALES
Switch(config)#vlan 5
Switch(config)#name SALES
Switch#vlan 5
Switch(config-vlan)#name SALES
Switch(config)#vlan 5 name SALES
Switch(config)#vlan 5
Switch(config-vlan)#SALES
You are configuring static NAT on a Cisco IOS router that is connected to your ISP. You goal is to have the private IP of 10.1.1.10 translated to 203.0.113.5. Which command must be issued on the interface connected to the service provider?
ip nat pool NAT_POOL 203.0.113.5
ip nat inside
ip nat outside
ip nat inside source static 10.1.1.10 203.0.113.5
What protocol is used to synchronize time between various Cisco IOS devices in your network?
LACP
NTP
DTP
STP
CDP
The configuration register on your Cisco IOS 2900 series router is set to 0x2101. How will the router choose the IOS image during the boot process?
The last image located in flash will be booted
The first image located in flash will be booted
The image listed in the boot system command will be booted
The image located on a TFTP server will be booted
You need to determine the VLAN ID that will be placed in a frame as it exits your Cisco IOS ISR interface of GigabitEthernet 0/0.20. Which command will you use?
Show ip route
Show mac-address table dynamic
Show interface gigabitethernet 0/0.20
Show interface gigabitethernet 0/0.20 switchport
Show vlan
You need to create an ACL entry that will only permit all addresses in the 10.1.1.16/28 network.
Which address and wildcard mask combination will accomplish this for us?
10.1.1.16 0.0.0.31
10.1.1.16 0.0.0.63
10.1.1.16 0.0.0.255
10.1.1.16 0.0.0.15
10.1.1.16 0.0.0.3
Which statements correctly define unique local unicast addresses? ( Two Chooses)
A. They are not routable
B. They are identified by the prefix FE80::/10
C. They are identified by the prefix 2000::/3
D. They are identified by the prefix FC00::/7
E. They are routable in your private network
Which IPv6 address is valid?
2031:0:130F::9C0:876A:130B
2001:0DB8:0000:130F:0000:0000:08GC:140B
2001:0DB8:0:130H::87C:140B
2031::130F::9C0:876A:130B
Which two are features of IPv6?
Multicast
broadcast
anycast
allcast
IPv6 loop-back address
127.0.0.1
Fe80::1
::1
::2
With which network type will OSPF establish router adjacencies but not perform the DR/BDR election process?
Point-to-point
Backbone area 0
Broadcast multi-access
Non-broadcast multi-access
You get a call from a network administrator who tells you that he typed the following into his router:
Router(config)#router ospf 1
Router(config-router)#network 10.0.0.0 255.0.0.0 area 0
He tells you he still can't see any routes in the routing table. What configuration error did the administrator make?
The wildcard mask is incorrect.
The OSPF area is wrong.
The OSPF Process ID is incorrect.
The AS configuration is wrong.
Which of the following tables is used by a switch to discover the relations between the Layer 2 address of a device and the physical port used to reach the device?
The adjacency table
The ARP table
The VLAN table
The FIB table
The CAM table
Which of the following VLANs is used by DTP to negotiate a trunk link when 802.1Q encapsulation is configured on the interface?
The native VLAN
1
0
4094
Which of the following subnet addresses is most appropriate for a point-to-point link between two Routers ?
192.168.0.192/26
192.168.0.128/30
192.168.0.128/25
192.168.0.130/30
192.168.0.0/30
Which of the following Application layer protocols use UDP for unsynchronized, connectionless data transfer? (Choose two)
SMTP
HTTP
FTP
TFTP
SNMP
You want to configure SSH for incoming VTY connections on a new router. The router is running a K9 IOS image but has not yet been configured with a host name, a domain name, or an RSA key pair. In addition, the VTY lines are not yet configured to accept incoming SSH connections
You issue the crypto key generate rsa command from global configuration mode
Which of the following messages will you most likely receive?
Please define a hostname other than Router.
Please create RSA keys to enable SSH.
The name for the keys will be:
Please enable SSH as a transport mode
Please define a domain-name first.
You issue the following commands on a Cisco router named RouterA
enable password !abcu$3r!
enable secret abc4dm!n
line console 0
password abc4dm!n
line vty 0 15
login
password abcu$3r
service password-encryption
Another user has been asked to examine the running configuration on RouterA but not make any configuration changes. The user connects to RouterA by using Telnet.
Which of the following will the user require in order to perform this task?
The enable secret password and the console password
The console password alone
The VTY line password alone
The enable password and the console password
The enable secret password and the VTY line password
In a two-tier network design, which layers are combined together?
aggregation and access
core, distribution, and access
Core and distribution
core and access
distribution and access
Which of the following is enabled on a Cisco router when you issue the ntp server command from global configuration mode?
broadcast client mode
server mode
authentication
static client mode
Which of the following networks is not defined by RFC 1918?
10.1.1.0
192.168.111.0
10.16.1.0
172.172.1.0
172.20.1.0
You issue the show running-config command on RouterA and receive the following partial
output:
interface FastEthernet0/0
ip address 192.168.18.33 255.255.255.240
HostA is on the same physical network as the FastEthernet 0/0 interface of RouterA.
Which IP address should you configure on HostA to ensure that the host can communicate with
the rest of the network?
192.168.18.32/28
192.168.18.48/28
192.168.18.46/28
192.168.18.16/28
You connect a new Cisco Catalyst 3750-X switch to the LAN that is configured to use an NTP
server. You want the new switch to automatically obtain its time from the NTP server.
You manually configure the system clock and then issue the ntp server 1.1.1.1 command on the
new switch.
Which of the following should you do to complete a basic NTP client configuration?
Reconfigure NTP access restrictions
Disable NTP authentication
Nothing; the basic configuration is complete
Reconfigure the NTP packet source IP address
Disable the NTP broadcast service
Which of the following commands will automatically enable SSH on a router?
no transport input telnet
enable secret
crypto key generate rsa
transport input ssh
You have been given the task of configuring the IP properties of all the hosts on the LAN attached to Router.
Addresses should be assigned from the 172.16.12.0/28 subnet.
The first valid host address has been configured on the Fast Ethernet interface of the attached Router.
Which of the following is a valid configuration for a host on this subnet?
IP address: 172.16.12.15
Subnet Mask: 255.255.255.240
Default Gateway: 172.16.12.1
IP address: 172.16.12.6
Subnet Mask: 255.255.255.248
Default Gateway: 172.16.12.1
IP address: 172.16.12.30
Subnet Mask: 255.255.255.224
Default Gateway: 172.16.12.1
IP address: 172.16.12.10
Subnet Mask: 255.255.255.240
Default Gateway: 172.16.12.1
IP address: 172.16.12.17
Subnet Mask: 255.255.255.240
Default Gateway: 172.16.12.1
Given a host IP address of 48.25.24.71/21, what is the broadcast address for the subnetwork?
48.25.24.127
48.25.31.255
48.25.25.254
48.25.31.254
Which of the following Application layer protocols uses TCP for reliable, connection-oriented data transfer?
TFTP
FTP
SNMP
DHCP
