TYBBA (CA) Sem V Practical Slips
TYBBA (CA) Sem V Practical Slips
OR
Q.2 Python:
A) Write a Python program to accept n numbers in list and remove duplicates from a
list. [15 M]
B) Write Python GUI program to take accept your birthdate and output your age when a
button is pressed. [25 M]
1
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Competition’ collection of documents with the following fields: [15 M]
{Competition_Name: "….", Competition_Type: "….", Competition_Year:…,
students:["….", "….","…." ]}
In this, Competition_type can be ‘Sport’ or ‘Academic’.
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Competition’ collection in proper format.
OR
Q.2 Python:
A) Write a Python function that accepts a string and calculate the number of upper case
letters and lower case letters.
Sample String: 'The quick Brown Fox'
Expected Output:
No. of Upper case characters: 3
No. of Lower case characters: 13 [15 M]
B) Write Python GUI program to create a digital clock with Tkinter to display the time.
[25 M]
2
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Hospital’ collection of documents with the following fields: [15 M]
{ hospital_name:"Birla Hospital",
city: “Chinchwad”,
specialties:["Pediatric", "Orthopedic"],
doctors:[{doctor_name:"Dr. Kadam", visit_day:"Monday"}, {doctor_name:"Dr.
Mane", visit_day:"Tuesday"}],
services:["laboratory", "surgical", "diagnostic", "ambulance"],
rating:5
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Hospital’ collection in proper format.
OR
Q.2 Python:
A) Write a Python program to check if a given key already exists in a dictionary. If
key exists replace with another key/value pair. [15 M]
B) Write a python script to define a class student having members roll no, name, age,
gender. Create a subclass called Test with member marks of 3 subjects. Create three
objects of the Test class and display all the details of the student with total marks.
[25 M]
3
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
[25 M]
Q.2. MongoDB:
A) Create a ‘Book’ collection of documents with the following fields: [15 M]
{
Book_Title:"….", Publisher_name:"….", Authors:[".....","......"],
Language:"….",Publication_year:….,ISBN:…., price:…..
}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Book’ collection in proper format.
4
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create an ‘Institute’ collection of documents with the following fields: [15 M]
{ Name:"….", City:"….",No_of_faculties:….,Est_Year:….,
Courses:[{Course_Name:"….", Dur_in_month:….,Fees:….},…]
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Institute’ collection in proper format.
OR
Q.2 Python:
A) Write a Python script using class, which has two methods get_String and
print_String. get_String accept a string from the user and print_String print the string in
upper case. [15 M]
5
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Doctor’ collection of documents with the following fields: [15 M]
{
Doctor_name:"Dr. Patil",
Contact_No:9876543210,
City: “Pune”,
Qualification:"MBBS",
specialization:["ENT", "General Surgery"],
hospitals:[{hospital_name:"Niramay Hospital", visit_day:"Monday"},
{hospital_name:"Birla Hospital", visit_day:"Tuesday"}]
}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Doctor’ collection in proper format.
OR
Q.2 Python:
A) Write python script using package to calculate area and volume of cube and sphere
[15 M]
B) Write a Python GUI program to create a label and change the label font style (font
name, bold, size). Specify separate check button for each style. [25 M]
6
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A. Create a ‘Result’ collection of documents with the following fields: [15 M]
{
student_id:1,
student_name:"Mr. Anuj Joshi",
class:"TYBBA_CA",
test_marks:[{subject:"Java",marks:78},{subject:"Python",marks:80}],
grade: ‘A’
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Result’ collection in proper format.
7
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create an ‘Album’ collection of documents with the following fields: [15 M]
{title:"….",artist: ["….","…."],released_year: ….,
tracks:[{track_id: …., track_title:"….",seconds: …. },…..],genre: "…."}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Album’ collection in proper format.
OR
Q.2 Python:
A) Write a python script to find the repeated items of a tuple [15 M]
B) Write a Python class which has two methods get_String and print_String. get_String
accept a string from the user and print_String print the string in upper case. Further
modify the program to reverse a string word by word and print it in lower case.
[25 M]
8
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Write a java program to validate PAN number and Mobile Number. If it is invalid
then throw user defined Exception “Invalid Data”, otherwise display it. [25 M]
Q.2. MongoDB:
A) Create a ‘Contributor’ collection of documents with the following fields:[15 M]
{ Contributor_name: "Rohit Sawant",
Branch:"CSE",
Join_year:2019,
Language:["C++", "Java"],
Articles:[{Language:"C++",tArticles:20,pArticles:30},{Language:"Java",tArticl
es:50,pArticles:30}],
Personal_Info: {age:24, Sem_Marks:[70, 80, 77, 81]}
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Contributor’ collection in proper format.
OR
Q.2 Python:
A) Write a Python script using class to reverse a string word by word [15 M]
B) Write Python GUI program to accept a number n and check whether it is Prime,
Perfect or Armstrong number or not. Specify three radio buttons. [25 M]
9
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
[25 M]
Q.2. MongoDB:
A) Create a ‘Person’ collection of documents with the following fields: [15 M]
{pname: "….", contact_no: …. , city: "….", profession: ["….","…."],
cars:[{model: "….", year: ….,price: …. }, …. ]}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Person’ collection in proper format.
OR
Q.2 Python:
A) Write Python GUI program to display an alert message when a button is pressed.
[15 M]
B) Write a Python class to find validity of a string of parentheses, '(', ')', '{', '}', '[' ']’.
These brackets must be close in the correct order. for example "()" and "()[]{}" are
valid but "[)", "({[)]" and "{{{" are invalid. [25 M]
10
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Company’ collection of documents with the following fields: [15 M]
{ company_id:1,
company_name:"Apple",
contact_details:{ address: "Cupertino, CA 95014", phone: "1-408-996-1010"},
products:[{code: "A-123", name:"IPhone 7", price: 29,900},{code: "A-456",
name: "IPadPro", price: 37,900}],
rating:5
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Company’ collection in proper format.
OR
Q.2 Python:
A) Write a Python program to compute element-wise sum of given tuples.
Original lists: (1, 2, 3, 4) (3, 5, 2, 1) (2, 2, 3, 1)
Element-wise sum of the said tuples: (6, 9, 8, 6) [15 M]
B) Write Python GUI program to add menu bar with name of colors as options to
change the background color as per selection from menu option. [25 M]
11
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Customer’ collection of documents with the following fields: [15 M]
{ Cust_id: 1,
Cust_name: "Mr. Joshi",
address:{city: "Pune", street: "S. B. Road"},
orders: [
{ id:101,
orderItems:[
{ productId: 8, price: 560,
productName: "keyboard"
},…..],
},…..]
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Customer’ collection in proper format.
12
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Write a java program that asks the user name, and then greets the user by name.
Before outputting the user's name, convert it to upper case letters. For example, if
the user's name is Raj, then the program should respond "Hello, RAJ, nice to meet
you!". [25 M]
Q.2. MongoDB:
A) Create a ‘Student’ collection of documents with the following fields: [15 M]
{ rno: …., class: "….",
fname: "….", lname: "….",
age: …., address:{street: "….", city: "….", state: "…."},
hobbies: ["….","…."]
}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Student’ collection in proper format.
Q.2 Python:
A) Write a Python program to input a positive integer. Display correct message for
correct and incorrect input. (Use Exception Handling) [15 M]
B) Write a program to implement the concept of queue using list. [25 M]
13
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Musicians’ collection of documents with the following fields: [15 M]
{ id: ….,
name: "….",
birth_year: ….,
albums: ["….","…."],
instruments: ["….","…."]
}
1) Insert at least 10 documents in a collection, use bulk insert.
2) Display all documents of ‘Musicians’ collection in proper format.
OR
Q.2 Python:
A) Write a Python GUI program to accept dimensions of a cylinder and display the
surface area and volume of cylinder. [15 M]
B) Write a Python program to display plain text and cipher text using a Caesar
encryption. [25 M]
14
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Create a ‘Projects’ collection of documents with the following fields: [15 M]
{ proj_id: ….,
proj_name: "….",
proj_manager: "….",
start_date: ….,
dur_in_month: ….,
emps_work_in_proj: ["….","…."]
}
1) Insert at least 10 documents in a collection.
2) Display all documents of ‘Projects’ collection in proper format.
OR
Q.2 Python:
A) Write a Python class named Student with two attributes student_name, marks.
Modify the attribute values of the said class and print the original and modified values
of the said attributes. [15 M]
B) Write a python program to accept string and remove the characters which have odd
index values of given string using user defined function. [25 M]
15
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
OR
Q.2 Python:
A) Write a python script to create a class Rectangle with data member’s length, width
and methods area, perimeter which can compute the area and perimeter of rectangle.
[15 M]
B) Write Python GUI program to add items in listbox widget and to print and delete the
selected items from listbox on button click. Provide three separate buttons to add, print
and delete. [25 M]
16
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Define a class Product (pid, pname, price, qty). Write a function to accept the product
details, display it and calculate total amount. (use array of Objects) [25 M]
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create document named scientist with following fields:
2) {First Name: , Last Name: , Contribution: , Awarded: ,
date _of_birth: , Year : , Country: } in a collection.
The document keeps information about the scientist who has contributed in various
fields like Artificial intelligence, Data Science etc. The scientist may have contributed in
more than one field and may have received more than one awards for his contribution
in various fields.
2) Insert at least 10 documents in a collection.
B) Solve the Following Queries: [25 M]
1) List names of all scientists whose last name starts with N.
2) List all scientists who were born after 1/1/1960.
3) List scientists that received an award in year 2000.
4) List all scientists who have received “Turing Machine Award”
5) List all scientist who has made contributed in4fields
OR
Q.2 Python:
A) Write Python GUI program that takes input string and change letter to upper case
when a button is pressed. [15 M]
B) Define a class Date (Day, Month, Year) with functions to accept and display it.
Accept date from user. Throw user defined exception “invalid Date Exception” if the
date is invalid. [25 M]
17
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following : [15 M]
1) Create documents Inventory with following fields:
{Item Name: , status: , Tags: , qty: }
2) Insert at least 10 documents in a collection with suitable values. Verify created
documents.
B) Solve the Following Queries: [25 M]
1) List all items from the inventory where the status equals "D" and qty is greater
than30.
2) List all items which have 3 tags.
3) List all items having status equal to “A” or having quantity less than 30 and height
of the product should be greaterthan10
4) Delete the documents where status = ‘C’
5) Find all documents that keeps item “Planner” and having in stock quantity
lessthan20
OR
Q.2 Python:
A) Create a list a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] and write a python program that
prints out all the elements of the list that are less than 5 [15 M]
B) Write a python script to define the class person having members name, address.
Create a subclass called Employee with members staffed salary. Create 'n' objects of the
Employee class and display all the details of the employee. 25 M]
18
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create documents containing transaction information as:
{Transaction_id: Customer Name: , Payment_mode: ,
Amount: Date: } in which the payment was done – Cash, Credit Card or
DebitCard in a collection. Verify your created collection and documents by using
proper command.
2) Insert at least 10 documents in a collection.
OR
Q.2 Python:
A) Write a Python GUI program to accept a number form user and display its
multiplication table on button click. [15 M]
B) Define a class named Shape and its subclass(Square/ Circle). The subclass has an
init function which takes an argument (Lenght/redious). Both classes should have
methods to calculate area and volume of a given shape. [25 M]
19
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Construct a Linked List containing name: CPP, Java, Python and PHP. Then
extend your java program to do the following:
i. Display the contents of the List using an Iterator
ii. Display the contents of the List in reverse order using a ListIterator.
[25 M]
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create documents for Online Mobile Shopping information in a collection as follows:
{CustomerName: Model: ,Brand: , Price: ,RAM_Size:
, Internal_Memory: Ratings_by_customer: }
Verify your created collection and documents by using proper command.
2) Insert at least 10 documents in a collection.
OR
Q.2 Python:
A) Write a python program to create a class Circle and Compute the Area and the
circumferences of the circle.(use parameterized constructor) [15 M]
B) Write a Python script to generate and print a dictionary which contains a number
(between 1 and n) in the form(x,x*x).
Sample Dictionary (n=5) Expected Output: {1:1, 2:4, 3:9, 4:16, 5:25} [25 M]
20
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create collection called “marketing” which stores data about a marketing campaign
of a retail business. A document in this collection includes the following pieces of
information.
{_id : , Age : , Gender : ,OwnHome : , Married :
, Location : , Salary : , Children : ,History :
"High/Low", Catalogs : ,AmountSpent : }
Verify your created collection and document by using proper command.
2) Insert at least 10 documents in a collection and verify inserted document.
OR
Q.2 Python:
A) Define a class named Rectangle which can be constructed by a length and width.
The Rectangle class has a method which can compute the area and Perimeter.
[15 M]
B) Write a Python program to convert a tuple of string values to a tuple of integer
values. Original tuple values: (('333', '33'), ('1416', '55'))
New tuple values: ((333, 33), (1416, 55)) [25 M]
21
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create two documents named emp1 and emp2 as follows:
emp1 = {Empid: , EmpName: , Department: , Salary: }
emp2 = {Empid: , Age: , Address: }
add both these documents ( emp1 and emp2) to the Employee collection in the
subsequent order.
2) Verify your created collection and database by using proper command.
OR
Q.2 Python:
A) Write a python class to accept a string and number n from user and display n
repetition of strings by overloading * operator. [15 M]
22
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create document to grocery store as follows:
{item_id: , Batch_no: , Item_name: , Price: , Weight:
, Category: , items_in stock: }
in “departmental_store” collection.
2) Insert at least 10 documents in a collection with suitable values. Verify created
documents.
B) Solve the Following Queries: [25 M]
1) Display all documents in the “departmental_store” collection with batch no B1001.
2) Updates the Price of items for items having batch B1002
3) Display all items that comes in grain category.
4) Delete the items which stock is 0
5) Sort all items by their Batch_nos.
OR
Q.2 Python:
A) Write a Python GUI program to create a label and change the label font style (font
name, bold, size) using tkinter module. [15 M]
B) Create a class circles having members radius. Use operator overloading to add the
radius of two circle objects. Also display the area of circle. [25 M]
23
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Create a package TYBBACA with two classes as class Student (Rno, SName, Per)
with a method disp() to display details of N Students and class Teacher (TID, TName,
Subject) with a method disp() to display the details of teacher who is teaching Java
subject. (Make use of finalize() method and array of Object) [25 M]
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create a database named ‘College’. Create collection named ‘Commerce’ in it. This
collection should contain a document. Inside this document, we have a field named
‘Teacher_id’, ‘Teacher_Name’,‘Address’, ‘Salary’. Each document contains another
document with three fields(Specialization, Qualification, Experience) with their one
or more values.
Verify your created collection and database by using proper command.
2) Insert at least 10 documents in a collection with suitable values.
OR
Q.2 Python:
A) Write a Python Program to Check if given number is prime or not. Also find
factorial of the given no using user defined function. [15 M]
B) Write Python GUI program which accepts a number n to displays each digit of
number in words. [25 M]
24
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Created database TV Network containing a collection of products with multiple
documents having fields {“product_id” : ,"product_name": ,"company":, "type":
,"price":, "warranty_years":, "available": "true"},
2) Insert at least 10 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
B) Solve the Following Queries: [25 M]
1) Check if the cursor object has more documents to return or not.
2) Return the next document in a cursor.
3) Insert a new document having, product_name = “Tata sky", "type" : "tv",
"monthly_price" : 250, "term_years" : 2, "cancel_penalty" : 25, "sales_tax" : "true",
"additional_tariffs" : [ { "kind" : "federal tariff", "amount" : { "percent_of_service"
: 0.06 } }, { "kind" : "misc. tariff", "amount" : 2.25}]
4) sort all the documents present in the products collection in descending order.
5) Find how many documents are present in a collection.
OR
Q.2 Python:
A) Write a Python function that accepts a string and calculate the number of upper case
letters and lower case letters.
Sample String : 'The quick Brow Fox'
Expected Output :
No. of Upper case characters : 3
No. of Lower case Characters : 12 [15 M]
B) Write a Python script to Create a Class which Performs Basic Calculator Operations.
[25 M]
25
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create Programmer collection with documents containing fields
{Programmer_name: ,Join_year: , Languages:[……, ……..,
………], Programmer_details: {age: , "Address":[…., ……..]}};
2) Insert at least 10 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
OR
Q.2 Python:
A) Write an anonymous function to find area of square and rectangle. [15 M]
B) Write Python GUI program which accepts a sentence from the user and alters it
when a button is pressed. Every space should be replaced by *, case of all alphabets
should be reversed, digits are replaced by?. [25 M]
26
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Write a java program to accept directory name in TextField and display list of files
and subdirectories in List Control from that directory by clicking on Button.
[25 M]
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create documents with following data in a collection:
{ _id: ,vidio_title: ,description: , YouTuber Name:, url:,
tags: ['mongodb', 'database', 'NoSQL'], likes: 100 }
2) Insert at least 7 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
OR
Q.2 Python:
A) Write a Python program to unzip a list of tuples into individual lists. [15 M]
B) Write Python GUI program to accept a decimal number and convert and display it to
binary, octal and hexadecimal number. [25 M]
27
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
B) Write a java Program to accept the details of 5 employees (Eno, Ename, Salary) and
display it onto the JTable. [25 M]
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create a collection to embed the 3 branch document inside the Bank document like
(“Bank_name": ,"Contact": , "Address": ,"branch": ,“city”: )
that maintains all the related data in a single document. Branch should contain fields
like branch_id, branch_name&branch_address.
2) Insert at least 8 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
OR
Q.2 Python:
A) Write a Python GUI program to create a list of Computer Science Courses using
Tkinter module (use Listbox). [15 M]
B) Write a Python program to accept two lists and merge the two lists into list of tuple.
[25 M]
28
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create a collection "Customer" which contains documents with the same structure
like this one:
{"_id" : ,"firstname" : ,"lastname" : ,"email" :
"password" : , "last_login" : ,"address" : {"country":
,"street" : , ,"zip" : ,}}
2) Insert at least 8 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
OR
Q.2 Python:
A) Write a Python GUI program to calculate volume of Sphere by accepting radius as
input. [15 M]
B) Write a Python script to sort (ascending and descending) a dictionary by key and
value. [25 M]
29
Savitribai Phule Pune University
T.Y.B.B.A.(C.A.) Semester – V (CBCS 2019 Pattern) University Practical Examination
Lab Course: (CA-506) Computer Laboratory Based on 503, 504
Core Java, MongoDB / Python
Time: - 3 Hours] [Marks: - 100
Q.2. MongoDB:
A) Solve the following: [15 M]
1) Create a collection employee in your database with the following type of documents:
{"_id": 1,"emp_name": { name: , surname: }, "age": ,"city":
“salary”: }
2) Insert at least 8 documents in a collection with suitable values. Verify your created
collection and database by using proper command.
30