Code: ppBiotechnology2nd Semester2 Examination Papers

Python Programming

Official Bihar Engineering University examination question papers, marks distribution, and questions transcript. Available exam sessions: 2026, 2025.

Exam Year:

Get Instant AI Answers on this Paper

Open BEU Connect Android app to solve any numerical or derive formulas step by step.

Ask AI in App
Official Exam Paper TranscriptB.Tech 2nd Semester Examination, 2026
Bihar Engineering University, Patna
B.Tech 2nd Semester Examination - 2026

Python Programming

Time: 03 HoursCode: 100218Full Marks: 70

Instructions:

  1. The marks are indicated in the right-hand margin.
  2. There are NINE questions in this paper.
  3. Attempt FIVE questions in all.
  4. Question No. 1 is compulsory.
Q.1 Choose the correct option for the following questions (Answer any seven):[2×7=14]
  1. Python uses __________ to define blocks of code

    1. Braces
    2. Indentation
    3. Parentheses
    4. Semicolon
  2. The operator used for exponentiation is

    1. ^
    2. //
    3. **
    4. %
  3. The default step value in slicing is

    1. 0
    2. 1
    3. -1
    4. 2
  4. Strings in Python are

    1. Mutable
    2. Dynamic Arrays
    3. Immutable
    4. Numeric Objects
  5. Negative indexing begins from

    1. First element
    2. Last element
    3. Middle element
    4. Zero index
  6. Dictionaries store data in the form of

    1. Indexes
    2. Key-value pairs
    3. Lists
    4. Tuples
  7. The function used to combine two sequences into pairs is

    1. join()
    2. pair()
    3. zip()
    4. merge()
  8. Pickle module is mainly used for

    1. Image processing
    2. Networking
    3. Object serialization
    4. Graphics
  9. CSV stands for

    1. Common Separated Values
    2. Character Separated Values
    3. Comma Separated Values
    4. Column Separated Variables
  10. Python is known as a __________ typed language.

    1. Weakly
    2. Statically
    3. Dynamically
    4. Manually
Q.2
  1. Explain the different features of Python Programming language. What are the different arithmetic operators in Python? Explain their precedence and associativity.

    [7]
  2. What are the basic data types in Python? How does Python decide the type of any variable? How a float is converted to an integer? Explain.

    [7]
Q.3
  1. Evaluate the importance of user-defined functions in Python. Compare them with built-in functions and discuss situations where each should be preferred.

    [7]
  2. Assess the significance of string slicing, indexing and formatting in Python. Demonstrate the output of the following statements and justify your answers.

    s = "Programming"
    print(s[2:8])
    print(s[-5:])
    print(s[::-1])
    [7]
Q.4
  1. Differentiate between Lists, Tuples and Sets on the basis of syntax, mutability, indexing, performance and applications. Support your comparison with suitable examples.

    [7]
  2. Construct a Python program that creates a dictionary containing employee ID, employee name and salary. Display all records and update the salary of a given employee using suitable dictionary methods.

    [7]
Q.5
  1. Write a python program to find Greatest Common Divisor of two numbers.

    [7]
  2. Illustrate with suitable examples the following list methods in Python:
    (i) insert   (ii) append   (iii) pop   (iv) extend

    [7]
Q.6
  1. Write the differences between the if, if-else and if-elif-else statements in Python. Provide code examples to demonstrate the usage and scenarios where each statement is preferred.

    [7]
  2. Explain the utility of break and continue statement with an example.

    [7]
Q.7
  1. What is dictionary and how it is created in Python? What is meant by key-value pairs in a dictionary? How does del operation work on dictionaries? Give an example.

    [7]
  2. Write a python program to read two numbers. Then find out whether the first number is a multiple of the second number.

    [7]
Q.8
  1. Design a Python program to create a text file, write the details of ten students into it, and subsequently read the stored data. Discuss the sequence of file operations involved in the program.

    [7]
  2. Justify the significance of the os and os.path modules in Python. Demonstrate the use of suitable functions to create directories, determine file paths and verify file existence.

    [7]
Q.9 Write Short notes on any two of the following:[2×7=14]
  1. Dynamic and Strongly Typed Language

  2. Type Conversion

  3. Scope and Lifetime of Variables

  4. CSV File Handling

Related Official Syllabus

Check the complete official BEU syllabus for Biotechnology 2nd Semester to view credit allocations, recommended textbooks, and topics.

Open 2nd Semester Syllabus

Prepare Better with BEU Connect

  • Download papers for 100% offline study
  • Ask AI for step-by-step problem breakdown
  • Attempt official GATE CBT mock tests
  • Calculate SGPA and track attendance
Download Android App