Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

hkhkh

Total questions: 62

Worksheet time: 32mins

Name
Class
Date
1.
What will the output be from the following code?
print("Hello world!")
a)
SyntaxError
b)
Hello world!
c)
"Hello world!"
d)
print(Hello world!)
2.
What will the output be from the following code?
print(3+4)
a)
3+4
b)
7
c)
SyntaxError
d)
print(3+4)
3.
print("12"*3)
What would this print?
a)
36
b)
121212
c)
24
d)
12*3
4.
What will the output be from the following code?
print("3+4")
a)
7
b)
3+4
c)
34
d)
SyntaxError
5.
What will the output be from the following code?
Print("Hello world!")
a)
NameError
b)
Hello world!
c)
"Hello world"
d)
Print(Hello world!)
6.
What will the output be from the following code?
print("Hello" + "world" + "today")
a)
Helloworldtoday
b)
Hello world today
c)
"Hello" "world" "today"
d)
SyntaxError
7.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)
8.
What will the output be from the following code?
print(9/3)
a)
3
b)
3.0
c)
9/3
d)
SyntaxError
9.
Which function takes a users input
a)
print()
b)
int()
c)
input()
d)
def
10.
A data type consisting of numbers, letters and symbols.
a)
String
b)
Integer
c)
Float
d)
Boolean
11.
Which is the most appropriate data type for: "13th December"
a)
Float
b)
Boolean
c)
Integer
d)
String
12.
A location in memory used to store data that can be changed.
a)
Constant
b)
Value
c)
Variable
d)
Iteration
13.

Who developed Python Programming Language?

a)

a) Wick van Rossum

b)

b) Rasmus Lerdorf

c)

c) Guido van Rossum

d)

d) Niene Stom

14.

Which of the following is the correct extension of the Python file?

a)

a) .python

b)

b) .pl

c)

c) .py

d)

d) .p

15.

What will be the value of the following Python expression?

4 + 3 % 5

a)

a) 7

b)

b) 2

c)

c) 4

d)

d) 1

16.

Which of the following is used to define a block of code in Python language?

a)

a) Indentation

b)

b) Key

c)

c) Brackets

d)

d) All of the mentioned

17.

Which of the following character is used to give single-line comments in Python?

a)

a) //

b)

b) #

c)

c) !

d)

d) /*

18.

What is the order of precedence in python?

a)

a) Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

b)

b) Exponential, Parentheses, Division, Multiplication, Addition, Subtraction

c)

c) Parentheses, Exponential, Multiplication, Division, Subtraction, Addition

d)

d) Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

19.

Which of the following functions is a built-in function in python?

a)

a) factorial()

b)

b) print()

c)

c) seed()

d)

d) sqrt()

20.

Which of the following is not a core data type in Python programming?

a)

a) Tuples

b)

b) Lists

c)

c) Class

d)

d) Dictionary

21.

To add a new element to a list we use which Python command?

a)

a) list1.addEnd(5)

b)

b) list1.addLast(5)

c)

c) list1.append(5)

d)

d) list1.add(5)

22.

What will be the output of the following Python statement?

>>>"abcd"[2:]

a)

a) a

b)

b) ab

c)

c) cd

d)

d) dc

23.

What will be the output of the following Python code?

>>> str1 = 'hello'

>>> str2 = ','

>>> str3 = 'world'

>>> str1[-1:]

a)

a) olleh

b)

b) hello

c)

c) h

d)

d) o

24.

What will be the output of the following Python code?

>>>str1="helloworld"

>>>str1[::-1]

a)

a) dlrowolleh

b)

b) hello

c)

c) world

d)

d) helloworld

25.

What will be the output of the “hello” +1+2+3?

a)

a) hello123

b)

b) hello

c)

c) Error

d)

d) hello6

26.

Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?

a)

a) 5

b)

b) 4

c)

c) None

d)

d) Error

27.

Suppose list1 is [2445,133,12454,123], what is max(list1)?

a)

a) 2445

b)

b) 133

c)

c) 12454

d)

d) 123

28.

Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?

a)

a) [2, 33, 222, 14]

b)

b) Error

c)

c) 25

d)

d) [25, 14, 222, 33, 2]

29.

If a=(1,2,3,4), a[1:-1] is _________

a)

a) Error, tuple slicing doesn’t exist

b)

b) [2,3]

c)

c) (2,3,4)

d)

d) (2,3)

30.

Which of the following statements create a dictionary?

a)

a) d = {}

b)

b) d = {“john”:40, “peter”:45}

c)

c) d = {40:”john”, 45:”peter”}

d)

d) All of the mentioned

31.

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}

d["john"]

a)

a) 40

b)

b) 45

c)

c) “john”

d)

d) “peter”

32.

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)

a) {1: ‘A’, 2: ‘B’, 3: ‘C’}

b)

b) Method update() doesn’t exist for dictionaries

c)

c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}

d)

d) {4: ‘D’, 5: ‘E’}

33.

Which of the following switch port modes will successfully form a trunk between two switches? (choose four)

a)

Dynamic desirable – dynamic auto

b)

Trunk – dynamic desirable

c)

Access – dynamic auto

d)

Trunk - trunk

e)

Trunk – dynamic auto

34.

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?

a)

show ip dhcp assignments

b)

show ip dhcp address

c)

show ip dhcp conflicts

d)

show ip dhcp bindings

e)

show ip dhcp pool

35.

Which commands will successfully create VLAN 5 and name it SALES on a Catalyst IOS switch?

a)

Switch(config)#vlan 5

Switch(config-vlan)#name SALES

b)

Switch(config)#vlan 5

Switch(config)#name SALES

c)

Switch#vlan 5

Switch(config-vlan)#name SALES

d)

Switch(config)#vlan 5 name SALES

e)

Switch(config)#vlan 5

Switch(config-vlan)#SALES

36.

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?

a)

ip nat pool NAT_POOL 203.0.113.5

b)

ip nat inside

c)

ip nat outside

d)

ip nat inside source static 10.1.1.10 203.0.113.5

37.

What protocol is used to synchronize time between various Cisco IOS devices in your network?

a)

LACP

b)

NTP

c)

DTP

d)

STP

e)

CDP

38.

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?

a)

The last image located in flash will be booted

b)

The first image located in flash will be booted

c)

The image listed in the boot system command will be booted

d)

The image located on a TFTP server will be booted

39.

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?

a)

Show ip route

b)

Show mac-address table dynamic

c)

Show interface gigabitethernet 0/0.20

d)

Show interface gigabitethernet 0/0.20 switchport

e)

Show vlan

40.

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?

a)

10.1.1.16 0.0.0.31

b)

10.1.1.16 0.0.0.63

c)

10.1.1.16 0.0.0.255

d)

10.1.1.16 0.0.0.15

e)

10.1.1.16 0.0.0.3

41.

Which statements correctly define unique local unicast addresses? ( Two Chooses)

a)

A. They are not routable

b)

B. They are identified by the prefix FE80::/10

c)

C. They are identified by the prefix 2000::/3

d)

D. They are identified by the prefix FC00::/7

e)

E. They are routable in your private network

42.

Which IPv6 address is valid?

a)

2031:0:130F::9C0:876A:130B

b)

2001:0DB8:0000:130F:0000:0000:08GC:140B

c)

2001:0DB8:0:130H::87C:140B

d)

2031::130F::9C0:876A:130B

43.

Which two are features of IPv6?

a)

Multicast

b)

broadcast

c)

anycast

d)

allcast

44.

IPv6 loop-back address

a)

127.0.0.1

b)

Fe80::1

c)

::1

d)

::2

45.
An administrator wants to configure hosts to automatically assign IPv6 addresses to themselves by the use of Router Advertisement messages, but also to obtain the DNS server address from a DHCPv6 server. Which address assignment method should be configured?
a)
SLAAC
b)
stateless DHCPv6
c)
stateful DHCPv6
d)
RA and EUI-64
46.

With which network type will OSPF establish router adjacencies but not perform the DR/BDR election process?

a)

Point-to-point

b)

Backbone area 0

c)

Broadcast multi-access

d)

Non-broadcast multi-access

47.

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?

a)

The wildcard mask is incorrect.

b)

The OSPF area is wrong.

c)

The OSPF Process ID is incorrect.

d)

The AS configuration is wrong.

48.

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?

a)

The adjacency table

b)

The ARP table

c)

The VLAN table

d)

The FIB table

e)

The CAM table

49.

Which of the following VLANs is used by DTP to negotiate a trunk link when 802.1Q encapsulation is configured on the interface?

a)

The native VLAN

b)

1

c)

0

d)

4094

50.

Which of the following subnet addresses is most appropriate for a point-to-point link between two Routers ?

a)

192.168.0.192/26

b)

192.168.0.128/30

c)

192.168.0.128/25

d)

192.168.0.130/30

e)

192.168.0.0/30

51.

Which of the following Application layer protocols use UDP for unsynchronized, connectionless data transfer? (Choose two)

a)

SMTP

b)

HTTP

c)

FTP

d)

TFTP

e)

SNMP

52.

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?

a)

Please define a hostname other than Router.

b)

Please create RSA keys to enable SSH.

c)

The name for the keys will be:

d)

Please enable SSH as a transport mode

e)

Please define a domain-name first.

53.

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?

a)

The enable secret password and the console password

b)

The console password alone

c)

The VTY line password alone

d)

The enable password and the console password

e)

The enable secret password and the VTY line password

54.

In a two-tier network design, which layers are combined together?

a)

aggregation and access

b)

core, distribution, and access

c)

Core and distribution

d)

core and access

e)

distribution and access

55.

Which of the following is enabled on a Cisco router when you issue the ntp server command from global configuration mode?

a)

broadcast client mode

b)

server mode

c)

authentication

d)

static client mode

56.

Which of the following networks is not defined by RFC 1918?

a)

10.1.1.0

b)

192.168.111.0

c)

10.16.1.0

d)

172.172.1.0

e)

172.20.1.0

57.

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?

a)

192.168.18.32/28

b)

192.168.18.48/28

c)

192.168.18.46/28

d)

192.168.18.16/28

58.

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?

a)

Reconfigure NTP access restrictions

b)

Disable NTP authentication

c)

Nothing; the basic configuration is complete

d)

Reconfigure the NTP packet source IP address

e)

Disable the NTP broadcast service

59.

Which of the following commands will automatically enable SSH on a router?

a)

no transport input telnet

b)

enable secret

c)

crypto key generate rsa

d)

transport input ssh

60.

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?

a)

IP address: 172.16.12.15

Subnet Mask: 255.255.255.240

Default Gateway: 172.16.12.1

b)

IP address: 172.16.12.6

Subnet Mask: 255.255.255.248

Default Gateway: 172.16.12.1

c)

IP address: 172.16.12.30

Subnet Mask: 255.255.255.224

Default Gateway: 172.16.12.1

d)

IP address: 172.16.12.10

Subnet Mask: 255.255.255.240

Default Gateway: 172.16.12.1

e)

IP address: 172.16.12.17

Subnet Mask: 255.255.255.240

Default Gateway: 172.16.12.1

61.

Given a host IP address of 48.25.24.71/21, what is the broadcast address for the subnetwork?

a)

48.25.24.127

b)

48.25.31.255

c)

48.25.25.254

d)

48.25.31.254

62.

Which of the following Application layer protocols uses TCP for reliable, connection-oriented data transfer?

a)

TFTP

b)

FTP

c)

SNMP

d)

DHCP