Object Oriented Programming II
CSE · Midterm · Spring 23
Batch 59, 60
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Daffodil International University
Department of Computer Science and Engineering
Faculty of Science & Information Technology
Midterm Examination, Spring-2023
Course Code: CSE233, Course Title: Object Oriented Programming II
Level: 3, 2 Term: 1, 3 Batch: 59, 60
Time: 1.5 hrs
Marks: 25
Answer ALL Questions
[The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.]
1. Consider the following random items code of groceries.
d = 181, 178, 187, 182, 192, 189, 202, 201
The concept of dataset is crucial for modern intelligence systems. Initially, we need to process any data using basic programming concepts such as statistical analysis. Here providing data is also part of that concept which is provided in your class lecture. | CO2
a) Create a list constructor for the provided dataset. | 2
b) Develop a function for the data where the function will regenerate the values in reverse and sorted way following all the necessary requirements. | 5
c) Compare between list and array. | 3
2. Consider the following scenario for the Chatgpt
You: Hi!
Chatgpt: Hi! What can I do now?
You: Do you know me?
Chatgpt: You are from Daffodil International University. You are currently studying 5th semester.
You: Thanks for your information.
Chatgpt: Thanks for your gratitude.
You know that chatgpt is a complex artificial system. And it requires a more powerful system such as a supercomputer. You have no development knowledge of a chatgpt but you have the basic knowledge of object oriented programming II. Now you need to implement some concepts to develop the demo chatgpt. | CO1
a) Construct a function to build the demo Chatgpt and all necessary input will take form the user as their wishes. | 5
b) Justify the line from your demo chatgpt “Chatgpt is better than human”. | 3
c) Explain the process to change the word “5th” to “7th” in the given string. | 2
3. Let's consider two different list
K = [1001, 1002, 1003, 1004, 1005]
V = ["USA", "Canada", "China", "Japan", "UK"]
Propose a function to convert two lists into a dictionary using python script. | CO3 | 5