END TERM EXAMINATION

Third Semester (BCA) December 2024

Paper Code: BCAT-211

Subject: Basics of Python Programming

Time: 3 Hours

Maximum Marks: 60

Note: Attempt five questions in all, including Q.no.1, which is compulsory. Select one question from each unit.



Q1. Write short notes on the following:

UNIT-I

Q2. (a) Explain in detail the various data types in Python Programming Language. 5

(b) Differentiate between for Loop and while Loop with Python code. 5

Q3. (a) Explain in detail about the various Operators in Python Programming Language. 5

(b) What are Strings in Python Programming Language? Give examples of various String handling functions and methods in Python. 5

UNIT-II

Q4. (a) Explain the Dictionary and its various operations and methods with examples. 5

(b) Make a list of the first 10 letters of the alphabet, then use the list to do the following operations: 5

Q5. (a) Explain Tuples and its various operations and methods with examples. 5

(b) Create a dictionary whose keys are month names and whose values are the number of days in the corresponding month. 5

UNIT-III

Q6. (a) Write a program that uses a user-defined function that accepts name prefixes (as M for Male, F for Female) and prefixes Mr. / Ms. Based on the gender. 5

(b) Explain any three methods of math module with an example. 5

Q7. (a) Write a menu-driven program to implement a basic calculator. 5

(b) Explain any three methods of random module with an example. 5

UNIT-IV

Q8. (a) Create a binary file with roll number, name, marks and perform the following operations. 5

(b) Explain the features of the NumPy Library. Explain any two methods of NumPy Library. 5

Q9. (a) Create a binary file with Item number, Name, Price and perform the following operations. 5

(b) Explain the features of the matplotlibLibrary. Explain any two methods of matplotlibLibrary. 5