0% found this document useful (0 votes)
6 views5 pages

Python Question Paper

The document outlines a comprehensive Python developer assessment consisting of six questions covering logic programming, MySQL query optimization, file operations, recursive functions, data structures, and memory management. Candidates are instructed to complete the assessment within one hour without using online resources, and their answers will serve as a basis for discussion during the interview. Each question requires specific programming tasks or explanations related to Python and database operations.

Uploaded by

shubham.ravi9313
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Python Question Paper

The document outlines a comprehensive Python developer assessment consisting of six questions covering logic programming, MySQL query optimization, file operations, recursive functions, data structures, and memory management. Candidates are instructed to complete the assessment within one hour without using online resources, and their answers will serve as a basis for discussion during the interview. Each question requires specific programming tasks or explanations related to Python and database operations.

Uploaded by

shubham.ravi9313
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Comprehensive Python Developer Assessment

Duration: 1 hour
Instructions:
1. You can download this assessment document, edit and submit with your answers in
the format shown below.
2. Do not use google and any online help to answer.
3. Answers that you provide, will be a baseline for discussion during the interview.
4. Attempting answers to all questions is mandatory.

Name of the Candidate:

Total Experience:

Question 1 (Logic - Programming):

Scenario: Write a Python program for a given logic.

Task: We have 2 variables, variable1 and variable2. Please find the index of the sub-string
occurrence. Prepare the custom logic and Avoid using inbuilt functions.

Input: variable1 = "gifts are good to hold",


variable2= "good"
Output: 10
Explanation: "good" occurs at index 10.
Question 2 (MySQL - Query Optimization):

Scenario: Query optimizations.

Task: Optimize the following query with clear explanation:

select * from emp


where department_id in
(select id from department
where city in
(select city from cities) )

Question 3 (File Operations) :


Scenario: Perform file read/write operations.

Task: Write a python program, that reads the file employees.csv and return the following
output:

Input: employees.csv

EmployeeID Salary Department

1SB001 10,00,000 Development

1SB002 20,00,000 Business

1SB003 10,00,000 Development

1SB004 30,00,000 Sales

1SB005 10,00,000 Business

1SB006 50,00,000 Development

Output:
Department TotalEmployee HighestSalary
Development 3 50,00,000
Business 2 20,00,000
Sales 1 30,00,000

Question 4 (Recursive function - Python):


Write a logic to Find the list of prime numbers for the range for 30 using a recursive function.

Question 5 (Python Data Structure):

Write code snippets to hold below given diagram data/Nodes in python data structure.

Note:
● Please make a note we can extend this below tree till Nth level.
● Make sure easy traversing/Searching should be possible with your provided solution.
Question 6: Describe the memory management in python ? How python will handle the
memory management in below 5 scenarios.

1. Var1 = [1, 2, 3]
2. Var2 = Var1
3. Var1.append(4)
4. Var2 = (1, 2)
5. Var2[0] = 3

You might also like