PYTHON NETWORK PROGRAMMING QUIZ DESCRIPTION

one of the following classes are used for connection-less socket programming?

  • Datagram Socket
     

  • Datagram Packet

  • Both Datagram Socket

  • Datagram Packet

In the communication pathway data transfers from one point to another through_____.

  • Medium
     

  • Node

  • Link

  •  All of these

One of the following is a path vector routing?

  • exterior gateway protocol
     

  • inter-domain routing
     

  •  network routing protocol
     

  •  All of these

IDEA algorithm generates ______keys.

  • 56

  • 28

  • 52

  • 72

The Routing tables of a router used to keep?

  • MAC Address Assignments
     

  • Port Assignments to network devices
     

  • Distribute IP address to network devices
     

  • The routes  for forwarding the data to its destination

For what purpose, the bg is used in Tkinter widget ?

  • To change the direction of widget
     

  •  To change the size of widget
     

  • To change the color of widget
     

  •  To change the background of widget

FDDI stands for.

  • Fiber Distributed Data Interface
     

  • Fiber Data Distributed Interface
     

  • Fiber Dual Distributed Interface

  • Fiber Distributed Data Interface

Select from the following in which forwarding, the complete IP address of a destination is provided in the routing table.

  • next-hop
     

  • host-specific
     

  •  network-specific
     

  • default

TCP groups a number of bytes together______in a packets.

  •  user datagram
     

  • datagram
     

  •  segment
     

  • packet

High speed connectivity providing through_______network.

  • LAN
     

  • MAN
     

  •  WAN
     

  • All of these

______ are the advantages of hierarchical routing.

  • Flexibility
     

  • Reliability

  • Scalability

  • Portability

What is a socket?

  • Programming that allows only local computers to communicate with each other
     

  • TCP connection between local computers only
     

  • Connection between computers, over UDP only
    D. Abstraction of ports
        

  •  Abstraction of ports
        

A stream is
 

  • A TCP data transport link
     

  • A group of socket connections
     

  •  A group of packets
     

  •  A UDP transport link

What is a python library that can be used to send and receive data over HTTP?

  • http
     

  •  urllib
     

  •  port
     

  • header

What is the process by which search engines retrieve webpages and build a search index called?

  • scrape
     

  •  parse
     

  • . BeautifulSoup
     

  • spider

What happens if you fail to stop the stream before closing the socket?

  • Data loss
     

  • Nothing
     

  •  Logic error
     

  • Socket lockup

Select which one is used in delivery, the deliverer of the IP packet and the destination are on different networks.

  • a connection-oriented
     

  • an indirect
     

  •  a direct
     

  • none of the above

How many S – boxes used in DES algorithm?

  • 6

  • 24

  • 8

  • 42

What provides two way communication between two different programs in a network.

  • socket
     

  •  port
     

  •  http
     

  •  protocol

Which one is the natural mask for a class C Network?

  • 255.255.255.1
     

  •  255.255.255.255
     

  •  255.255.255.254
     

  • 255.255.255.0

What is a socket?

  • Programming that allows only local computers to communicate with each other
     

  • TCP connection between local computers only
     

  • Connection between computers, over UDP only
    D. Abstraction of ports
        

  •  Abstraction of ports
        

Optical Fiber transmit______.

  • light signal
     

  • radio signal

  • electrical signal

  • Both A and B

TCP groups a number of bytes together______in a packets.

  • user datagram
     

  • datagram

  • segment

  • packet

 

What does the following block of code do?

import urllib.request, urllib.parse, urllib.error
img = urllib.request.urlopen('http://data.pr4e.org/cover3.jpg').read()
fhand = open('cover3.jpg', 'wb')
fhand.write(img)
fhand.close()

  • It retrieves 'cover3.jpg' and saves it to your computer.
     

  •  It displays the image 'cover3.jpg'.
     

  • It retrieves the url to download 'cover3.jpg'
     

  • It doesn't retrieves anything.

Coaxial cables used in ________networks

  • Telephone
     

  • Cable TV

  • Both A and B

  • NONE OF these

172.31.25.151 is an example of which one?

  • Public
     

  •  Private
     

  •  Class A
     

  • Class E

Select the size of the Source and Destination IP address in the IP header.

  • 4 bits
     

  •  32 bits
     

  • 16 bits
     

  • . 8 bits

 

What does the following block of code do?

import urllib.request
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
for line in fhand:
    print(line.decode().strip())

  • It creates a file named 'romeo.txt' in 'data.pr4e.org'
     

  •  It finds the urls linked to 'data.pr4e.org' and prints it.
     

  •  It opens a file named 'http://data.pr4e.org/romeo.txt' in local storage
     

  •  It prints the contents of 'romeo.txt' after retrieving it from 'data.pr4e.org'

Choose the function of a router

  • changing the data from one format to another
     

  •  error detection in data
     

  •  send the packet to the uplinks
     

  • None of the above

Which function is used to set the size of the tkinter window?
 

  • setsize()
     

  • size()
     

  •  geometry()
     

  • dimension()