0% found this document useful (0 votes)
937 views15 pages

V Semester BSC Question Bank

This document contains question banks for two courses - DSC5: Programming in Python and DSC6: Computer Networks for the 5th semester B.Sc. Computer Science program at Mangalore University. The question banks are divided into various units and cover topics like Python programming fundamentals, strings, lists, dictionaries, files, classes and inheritance, GUI programming, SQLite database, and NumPy. They include short 2 mark questions as well as long answer questions requiring detailed explanations with examples.

Uploaded by

gagan.kulal619
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
937 views15 pages

V Semester BSC Question Bank

This document contains question banks for two courses - DSC5: Programming in Python and DSC6: Computer Networks for the 5th semester B.Sc. Computer Science program at Mangalore University. The question banks are divided into various units and cover topics like Python programming fundamentals, strings, lists, dictionaries, files, classes and inheritance, GUI programming, SQLite database, and NumPy. They include short 2 mark questions as well as long answer questions requiring detailed explanations with examples.

Uploaded by

gagan.kulal619
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

MANGALORE UNIVERSITY

National Education Policy – 2020


[NEP-2020]

QUESTION BANK

OF

DSC5: Programming in Python


DSC6: Computer Networks

FOR

V SEMESTER B.SC.-COMPUTER SCIENCE


DSC5: Programming in Python
Unit I
Two Mark questions
1. How to write a comment line in Python? Mention two types.
2. What is Python Virtual Machine?
3. Which is the 2 step process of Python program execution?
4. How do you import a library in python? Explain with an example.
5. Name the four types of scalar objects supported in Python.
6. List any four standard datatypes supported by Python.
7. How do you determine the data type of a variable? Explain with an
example
8. What is the purpose of membership operators? Explain with an example
9. What is an identifier?
10.What are the rules for naming identifiers?
11.How to input data in Python? Give an example
12.List four type conversion functions.
13.List any four categories of Operators in Python.
14.compare division (/) and modulus (%) operators
15.What are the use of exponent (**) and floor division (//) operators?
16.What is indentation? Why it is required?
17.Write the syntax of if..elif statement in Python
18.What is the purpose of else suit in Python loops? Give example
19.What is the use of break and continue statements in python?
20.What are python keywords? Give example
21.What are python Variables?
22.What are the rules for naming variables?
23.Give syntax and example for assigning values to variables
24.Give the syntax and example for str.format() method
25.What is f-string literal? Give an example
26.What are syntax errors? Give example
27.What are Exceptions? Give Example
28.What is the use of try block and except block in Python?
29.What is use of finally statement?
30.Differentiate scope and life time of a variable.
31.What is a global variable? Explain with an example.
32.List any four built in functions in Python.
33.Give the Syntax of user defined function.
34.What is the purpose of pass statement? Explain with an example.
35.Give the syntax and example for range() function.
36.What is the meaning of __name__ == __main__ ?
37.Give example of function returning multiple values.
38.What is keyword argument? Give example
39.What is default argument? Give example
40.Differentiate *args and **kwargs

Long Answer Questions

1. Explain any five features of Python.


2. Explain any five Flavors of Python .
3. Explain various data types in Python.
4. Explain the Arithmetic operators, logical operators and relational
operators with an example.
5. Explain the bitwise operators with examples.
6. Explain input() and print() functions with examples.
7. How to read different types of input from the keyboard. Give examples
8. Explain use of string.format and f-string with print() function.
9. With example explain how command line arguments are passed to python
program.
10. Explain the if-elif-else conditional statement with a programming
example.
11.Explain while and for loops with syntax and example.
12.Give the syntax of range function. Explain use range function in for loop
with examples.
13.Explain Exception handling in Python with try…except… finally block
14.List five common Exception types available in python and explain when
do they occur?
15.Explain the purpose of ‘else’ and ‘finally’ blocks in exception handling
with an example.
16.Write a program to check for ‘ValueError’ exception
17.Write a program to check for ZeroDivisionError Exception
18.With syntax and example explain how to define and call a function in
Python
19.Explain *args and **kwargs with example
20.With example explain keyword arguments and default arguments to the
function.
21.How to return multiple values from a function definition? Explain with an
example.
22.What is a recursive function? How do you define a recursive function in
python? Explain with an example.
UNIT II
Two Mark questions

1. Give two methods of creating strings in Python.


2. List any two built in functions used with python strings. Mention their
use.
3. Why strings are called immutable?
4. What is use of negative indexing? Give example.
5. Give the output of the following Python code:
str1 = 'This is Python'
print( "Slice of String : ", str1[1 : 4 : 1] )
print ("Slice of String : ", str1[ 9:] )
6. Give the output of following Python code
newspaper = "new york times"
print(newspaper[0:12:4])
print (newspaper[::4])
7. Give the syntax and example for split function.
8. Write Python code to print each character in a string.
9. What is list? How to create list ?
10. List any four built-in functions used on list.
11. Write the output of the given python code :
aList = [123, 'xyz', 'zara', 'abc'];
aList.insert (3,2009)
print ("Final List:", aList)
12. What is dictionary? Give example.
13. List any four built-in functions used on dictionary.
14. Write a Python code to Traversing of key:value Pairs in Dictionaries
15. What is tuple? How it is created in Python?
16. What is the output of
tuple = ( 'abcd', 786 , 2.23, 'john',70.2 )
print (tuple[1:3])
17. Give syntax and purpose of two built-in functions used on tuples.
18. How to convert tuple into List? Give example.
19. Differentiate tuple and set datatype.
20. List any two set methods and mention purpose of each method.

Long Answer Questions

1. What is string slicing? Explain with examples.


2. Write a note on negative indexing and slicing in strings.
3. Explain split and join methods of string with example.
4. Explain concatenation, repetition and membership operations on string.
5. Explain any five string functions with syntax and example.
6. Write a note on indexing and slicing lists.
7. Explain any five list methods with syntax.
8. Write a Python code to implement stack operations using lists.
9. Write a Python code to implement queue operations using lists.
10.Write a note on nested lists.
11.With example explain how to Access and Modify key:value Pairs in
Dictionaries.
12.Explain any five dictionary methods with syntax.
13.Write a Python Program to Dynamically Build dictionary using User
Input as a List.
14.Explain with example how to traverse Dictionary using key:value pair.
15.Write a note on indexing and slicing tuples.
16.Write a Python program to populate tuple with user input data.
17.Explain any Five set methods.
UNIT III
Two Mark questions
1. List file types supported by Python. Give example for each.
2. Differentiate fully qualified path and relative path.
3. List any four file access modes in Python.
4. Give the syntax of with statement to open a file.
5. List any two file object attributes and mention its purpose.
6. What is use of seek() and tell() methods.
7. Define a class with a data attribute and a method attribute.
8. Give syntax of constructor definition in Python.
9. What is self-variable?
10.How to return object from a method? Give example
11.How to define private instance variables and methods in Python.
12.Which concept enables new classes to receive variables and methods of
existing classes? Give the general syntax of it.
13.List any four magic methods.
14.What is root window? How it is created in Python?
15.What is Canvas? How it is created in Python?
16.Differentiate Canvas and frame.
17.Differentiate Label and Text Widget.
18.What is an Entry widget? How it is created?
19.What is a SpinBox widget? How it is created?
20.List the values that can be assigned to selectmode property of Listbox.

Long Answer Questions


1. List and explain various file opening modes with examples.
2. With program example explain how ‘with’ statement is used to open
and close files
3. With code example explain any two methods to read data from the
file.
4. With code example explain any two methods to write data to the file.
5. Write Python program to find the longest word in a file. Sample file
content: Cat Dog Tiger Rabbit
6. Explain declaring a class, defining an object and constructor with
syntax and example.
7. What is inheritance? How to implement inheritance in Python? Give
an example
8. Explain with example overriding superclass constructor and method
9. Explain multiple inheritance in Python with an example.
10.What do you mean by a Widget? List and explain the use of any five
widgets available in Tkinter.
11.Explain the steps involved in creating a GUI application in Python
with a suitable example.
12.How to create a button widget and bind it to the event handler?
Explain with example.
13.Write a note on arranging Widgets in a frame using layout managers.
14.Explain the process of creating a Listbox widget with a suitable
example. Also, explain different values associated with selectmode
option.
15.Write a note on
i) Text Widget ii) Entry Widget

UNIT IV
Two Mark questions
1. How to connect to the SQLite database? Give example.
2. Write SQL code to create table in SQLite database.
3. Write SQL code to insert data in SQLite table.
4. Write SQL code to update SQLite table.
5. Write SQL code to Delete data and DROP table in SQLite table.
6. What is NumPy in Python?
7. Give any two uses of NumPy.
8. Give Python code to create NumPy array using array function.
9. How to create two-dimensional arrays using NumPy.
10.List any four NumPy array attributes.
11.Give syntax and example for NumPy arrange() function
12.What is Pandas Library ?
13.What is Pandas Series? Give example.
14.Write Python code to create Dataframe from a dictionary and display
its contents.
15.Write Python code to create Dataframe from a tuple and display its
contents.
16.What is Pandas DataFame ? How it is created?
17.Give the Python code to create Dataframe from .csv file.
18.How to add new column to Dataframe ?
19.Give the Python code to create Dataframe from Excel file.
20.Give Python code to find maximum and minimum values for
particular column of dataframe.
21.What is Data Visualization?
22.What is matplotlib and pyplot? Long Answer Questions.

Long Answer Questions

1. Explain four SQLite module methods required to use SQLite


database.
2. Explain any four SQLite database operations with example.
3. Write a Python Program to demonstrate various SQLite Database
operations.
4. Explain any five NumPy array attributes with syntax.
5. Explain any four NumPy array creation functions with example.
6. Write a note on Indexing, slicing, and iterating operations on NumPy
array.
7. Explain basic arithmetic operations on NumPy array with examples.
8. With code examples explain creating pandas series using Scalar data
and Dictionary.
9. Explain any four string processing methods supported by Pandas
Library with example.
10.Explain with example any two methods of creating DataFrame.
11.Explain any five operations on Dataframe with example.
12.Explain Bar Graph creation using Matplot Library module.
13.Write a program to display histogram.
14.Write a Python program to display Pie Chart showing percentage of
employees in each department. Assume there are 4 departments
namely Sales, Production, HR and Finance.
15.Write a Python Program to create Line Graph showing number of
students of a college in various Years. Consider 8 years data.
DSC6: Computer Networks
UNIT - I
2 MARKS
1. Define computer network.
2. What are the different uses of computer network?
3. Expand VPN, RFID.
4. Expand GPS, NFC.
5. Expand DMCA, CAPTCHA.
6. Expand WiMAX, NSP.
7. Expand ARPANET, ICMP.
8. Expand SMTP, RTP.
9. Expand HTTP, TELNET.
10.Expand FTP, DNS.
11.Expand TCP, UDP.
12.Expand DSL, SONET.
13.Expand LAN, MAN, WAN.
14.List out types of Network topologies.
15.What is Bus topology?
16.What is ring topology?
17.What is star topology?
18.What is peer-to-peer model?
19.What is client-server model?
20.List the different forms of e-commerce.
21.What is profiling and phishing?
22.What are the two types of transmission technology?
23.What is unicasting and broadcasting?
24. What are static and dynamic allocation methods.
25.What is communication subnet?
26.List and explain the components of subnet.
27.What are routing and forwarding algorithm?
28.What is addressing and flow control?
29.Differentiate connection oriented and connectionless service.
30.What is store-and-forward switching and cut-through switching?
31.List the different service primitives.
32.What is service and protocol?
33.Differentiate OSI and TCP/IP reference model.
Long Answer Questions

1. List and explain the uses of computer network.


2. Write a note on the following:
i. Business application
ii. Home application
3. Write a note on the following:
i. Mobile users
ii. Social issues
4. Write a note on the following:
i. LAN
ii. MAN
5. Write a note on WAN.
6. Write a note on LAN.
7. Explain network topology.
8. Explain Bus topology?
9. Explain star topology?
10.Explain ring topology?
11.Explain protocol hierarchies.
12.Explain design issues for the layers.
13.Differentiate connection oriented and connectionless service.
14.Write a note on service primitives.
15.Explain in brief different layers of OSI reference model.
16.Explain in brief different layers of TCP/IP reference model.
17.Differentiate OSI and TCP/IP reference model.

UNIT - II
2 MARKS
1. Expand UTP, IrDA.
2. Expand STDM, CDMA.
3. Expand FDM, OFDM.
4. Expand TDM,CDM.
5. What is transmission medium?
6. What is meant by unguided media?
7. What is meant by guided media?
8. Give examples for guided media.
9. Give examples for unguided media.
10.Draw a cutaway view of a coaxial cable.
11.Draw side view of a single fiber.
12.What are single-mode and multimode fiber.
13.What is chromatic dispersion and solitons.
14.Differentiate fiber optics and copper wire.
15.What is path loss?
16.What is multipath fading?
17.What is digital modulation?
18.What is multiplexing?
19.List the types of multiplexing.
20.What is FDM?
21.What is TDM?
22.What are the applications of FDM.
23.Differentiate FDM and TDM.
24.List the different switching techniques.
25.Differentiate circuit switching and packet switching.
26.Write the different design issues of data link layer.
27.Write the various services offered by the data link layer to the network
layer.
28.List the different framing methods.
29.Describe byte count method of framing.
30.Describe coding violations method of framing.
31.Expand PPP, HDLC.
32.Expand NIC, FEC.
33.What are the two different approaches of Flow control.
34.What is erasure channel?
35.List the different error-correcting codes.
36.List the different error-detecting codes.
37.Expand LDPC, CRC.
38.List the different fields from which the frame is composed of.
39.What is meant by event=cksum_err and event=frame_arrival ?

Long Answer Questions

1. Write a note on twisted-pair cable.


2. Write a note on the following:
i. Coaxial cable
ii. Fiber optics
3. Write a note on radio transmission.
4. Write a note on microwave transmission.
5. Write a note on the following:
i. Infrared transmission
ii. Light transmission
6. Explain the following types of multiplexing:
i. FDM
ii. TDM
7. Explain Code Division Multiplexing.
8. Explain the different types of switching techniques.
9. Explain the various services provided by the data link layer to the
network layer.
10.Explain the following framing methods:
i. Flag bytes with byte stuffing
ii. Flag bits with bit stuffing
11.Write a note on the following:
i. Error control
ii. Flow control
12.Explain Hamming code of error-correcting codes.
13.Explain Binary convolutional code of error-correcting codes.
14.Explain the following error-correcting codes:
i. Reed-solomon codes
ii. Low-Density Parity Check codes.
15.Explain Parity of error-detecting code with example.
16.Explain Checksums of error-detecting code with an example.
17.Suppose that a message 1001 1100 1010 0011 is transmitted using
Internet Checksum(4-bit word). What is the value of the checksum?
18.Explain Cyclic Redundancy Checks of error-detecting code with an
example.
19.What is the remainder obtained by dividing x7+x5+1 by the generator
polynomial x3+1?
20.A bit stream 10011101 is transmitted using the standard CRC method.
The generator polynomial is x3+1. Show the actual bit string transmitted.
Suppose that the third bit from the left is inverted during transmission,
Show that this error is detected at the receiver end.
21.Explain elementary data link protocols.
22.Explain Sliding Window protocol.
23.Explain a protocol using Go-Back-N.
24.Explain a protocol using Selective Repeat.

UNIT – III
2 MARKS
1. What is store-and-forward packet switching?
2. Write the various services offered by the network layer to the transport
layer.
3. What is routing algorithm?
4. Expand MPLS , CIDR.
5. Compare between Virtual-Circuit networks and Datagram networks.
6. What is broadcast routing?
7. What is multicast routing?
8. What is anycast routing?
9. What is Congestion?
10.List the approaches to congestion control.
11.List the principles of network layer in the internet.
12.List the different options for Option field in IPv4 protocol.
13.What is IP address ? Give example.
14.What is meant by subnetting and subnets?
15.What is meant by route aggregation and supernet?
16.Expand NAT , SIPP.
17.List different special IP addresses.
18.What are the major goals of IPv6?
19.List different extension headers of IPv6.
20.List the Internet control protocols.
21.Expand ICMP, ARP, DHCP.
22.List the different ICMP message types.
23.What is ARP?
24.What is MultiProtocol Label Switching?
25.Expand OSPF, BGP.
26.List the different types of OSPF message.
Long Answer Questions

1. Explain the implementation of connectionless service.


2. Explain the implementation of connection-oriented service.
3. Compare between Virtual-Circuit networks and Datagram networks.
4. Explain the concept of Flooding.
5. Explain Distance vector routing with an example.
6. Explain Link state routing with an example.
7. Explain hierarchical routing with an example.
8. Explain the approaches to congestion control.
9. List and explain the principles of network layer in the internet.
10.With a neat diagram explain the format of IP version 4 protocol.
11.Explain Classful addressing.
12.Briefly explain Network Address Translation.
13.With a neat diagram explain the format of IP version 6 protocol.
14.Explain Internet Control Message Protocol.
15.Explain Address Resolution Protocol.
16.Explain Dynamic Host Configuration Protocol.
17.Explain OSPF -an interior gateway protocol.
18.Explain BGP- an exterior gateway protocol.

UNIT – IV
2 MARKS
1. Write the various services offered by the transport layer.
2. Expand TSAP, NSAP.
3. What is Portmapper?
4. List the two main protocols in transport layer.
5. Expand TCP , UDP.
6. What is error control?
7. What is flow control?
8. Draw a neat diagram of UDP header.
9. Expand RPC , RTP.
10.What is TCP?
11.Expand PAWS , SACK.
12.List the states used in TCP connection management finite state machine.
13.Expand DNS , ICANN.
14.How DNS is used?
15.List the different DNS resource record types.
16.What is Name resolution?
17.Expand SMTP, MIME.
18.What are the two kinds of subsystems of Email system.
19.What is meant by User agent?
20.List the different header fields related to message transport in RFC 5322.
21.List the different message headers added by MIME.
22.List different SMTP extensions.
23.Expand IMAP , SOAP.
24.List different IMAP commands.
25.What is Webmail?
26.Expand HTTP , URL.
27.Expand URI , URN.
28.Expand HTML , CSS.
29.Expand CGI, PHP.
30.Expand JSP, AJAX.
31.Expand DOM , XML.
32.Expand XSLT , XHTML.
33.List the different built-in HTTP request methods.
34.List different HTTP message headers.
35.Draw a neat diagram of HTTP caching.

Long Answer Questions

1. Explain Elements of Transport protocol.


2. Explain the concept of Addressing.
3. Explain the process of connection establishment in Transport layer.
4. Explain the process of connection release in Transport layer.
5. With a neat diagram explain User Datagram Protocol.
6. Explain the technique of Remote Procedure Call.
7. Explain Real Time Transport Protocol.
8. Explain TCP service model.
9. With a neat diagram explain TCP segment header.
10.Explain the process of TCP connection establishment.
11.Explain the process of TCP connection release.
12.Explain the process of TCP sliding window.
13.Explain the architecture of Email system.
14.Explain the format of Internet message.
15.Write a note on MIME.
16.Write a note on SMTP.
17.Write a note on IMAP.
18.Write a note on World Wide Web.
19.Write a note on Static webpages.
20.Write a note on HTTP.
21.List and explain the built-in HTTP request methods.
22.List and explain HTTP message headers.
23.Write a note on HTTP caching.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy