[go: up one dir, main page]

0% found this document useful (0 votes)
51 views2 pages

Gate

The document outlines various Python programming concepts and tasks that could be asked during interviews, including basic syntax, file handling, string manipulation, object-oriented programming, algorithms, and optional web development topics.
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)
51 views2 pages

Gate

The document outlines various Python programming concepts and tasks that could be asked during interviews, including basic syntax, file handling, string manipulation, object-oriented programming, algorithms, and optional web development topics.
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/ 2

1.

Basic Syntax and Data Structures:

 Write a Python program to swap the values of two variables.

 Implement a function to check if a given number is prime.

 Create a program to find the factorial of a number using recursion.

2. File Handling:

 Write a Python script to read data from a file and perform specific operations (e.g.,
counting words, calculating statistics).

 Implement a program to write data to a file and then read and display the content.

3. String Manipulation:

 Write a Python function to reverse a string.

 Create a program to check if a given string is a palindrome.

 Implement a function to count the occurrences of each character in a string.

4. List, Dictionary, and Tuple Operations:

 Write a Python program to remove duplicates from a list.

 Implement a dictionary-based program to store student details and perform


operations like adding, deleting, or updating records.

 Create a Python script to sort a list of tuples based on a specific criterion.

5. Functions and Modules:

 Write a Python function to calculate the area of different shapes (e.g., circle, rectangle,
triangle) based on user input.

 Implement a module containing various utility functions (e.g., math operations, string
manipulation) and demonstrate importing and using functions from the module.

6. Error Handling:

 Write a Python script to handle exceptions for specific scenarios (e.g., division by zero,
file not found).

 Demonstrate the use of try-except blocks to gracefully handle errors in a program.

7. Object-Oriented Programming (OOP):

 Create a Python class representing a simple entity (e.g., Car, Employee) with attributes
and methods.

 Implement inheritance by creating subclasses that inherit properties and methods


from a parent class.
 Demonstrate encapsulation by defining private and public attributes in a class.

8. Algorithmic Problems:

 Solve coding challenges or algorithmic problems from platforms like LeetCode,


HackerRank, or CodeSignal using Python.

 Implement classic algorithms (e.g., sorting algorithms, searching algorithms) in Python


and analyze their time and space complexity.

9. Web Development (Optional):

 Depending on the specific role, recruiters might also ask candidates to demonstrate
their knowledge of web development using Python frameworks like Django or Flask.
This could involve tasks such as creating a basic web application, handling HTTP
requests, or interacting with databases.

You might also like