Skip to content
CY-306 · Computer Workshop (Python Programming)/Important Questions

Computer Workshop (Python Programming) (CY-306) - Important Questions

  1. Unit 414 Marks High Priority

    Design a class with attributes and methods for a simple real-world entity and demonstrate object creation and method calls.

    Design a class-based question covering basic OOP: attributes, methods, object creation and method invocation. Core derivation from Unit 4; most frequently asked topic.

  2. Unit 27 Marks High Priority

    Explain the difference between list and tuple with examples and when to use each.

    Conceptual comparison between list and tuple with examples and recommended usage scenarios. Frequently asked in examinations testing collections (Unit 2).

  3. Unit 17 Marks High Priority

    Write a function to reverse a string (or list) and show its output for a sample input.

    Basic function-writing and algorithmic manipulation of sequences (Unit 1). Common short answer/coding task.

  4. Unit 410 Marks High Priority

    Explain inheritance in Python with an example showcasing single, multilevel and multiple inheritance and method overriding. Provide code to demonstrate how method resolution works in your examples.

    Object-oriented concept testing: inheritance types and method overriding; demonstrates understanding of subclassing (Unit 4).

  5. Unit 210 Marks High Priority

    Write a Python program to count the frequency of words in a given text using a dictionary and display the top N most frequent words.

    Dictionary-based programming problem: counting and aggregating data using dictionary operations (Unit 2). Tests mapping usage and data processing.

  6. Unit 37 Marks High Priority

    Given a Python code block with loops and conditionals, determine the output and explain the control flow.

    Control-flow comprehension: mixture of loops and conditional statements; asks for output determination and control-flow explanation (Unit 3).

  7. Unit 17 Marks High Priority

    Write code to demonstrate string slicing, common string methods and escape sequences in Python with examples.

    String operations, slicing and escape sequence handling (Unit 1). Practical demonstration question for string manipulation knowledge.

  8. Unit 47 Marks High Priority

    Explain exception handling in Python with try, except, else and finally. Write a program that catches multiple exception types and raises a custom exception.

    Error-handling fundamentals: try/except/else/finally, raising and catching multiple exceptions and creating custom exceptions (Unit 4).

  9. Unit 510 Marks Medium Priority

    Demonstrate file I/O: write code to read a text file, process lines (e.g. count words) and handle exceptions.

    File I/O combined with error handling and simple text processing using standard libraries (Unit 5). Moderately frequent practical task.

  10. Unit 27 Marks High Priority

    Explain list comprehensions with examples and write code to generate a list of squares of even numbers from $1$ to $N$.

    List comprehension and higher-order list manipulation (Unit 2). Common coding question to test concise Pythonic constructs.

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in