0% found this document useful (0 votes)
2K views8 pages

Python Programming Course Guide

This document contains a question bank for the course "Programming with Python 22616" covering 6 units: 1. The first unit covers algorithms, Python features and applications, input/output statements, data types, variables, and flowcharts. 2. The second unit covers operators, control flow structures, assignment operators, conditional statements, and loops. 3. The third unit covers lists, strings, dictionaries, tuples, sets, and importing modules. 4. The fourth unit covers functions, arguments, namespaces, scoping, and modules. 5. The fifth unit covers classes, objects, methods, inheritance, polymorphism, and code reusability. 6. The sixth unit

Uploaded by

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

Python Programming Course Guide

This document contains a question bank for the course "Programming with Python 22616" covering 6 units: 1. The first unit covers algorithms, Python features and applications, input/output statements, data types, variables, and flowcharts. 2. The second unit covers operators, control flow structures, assignment operators, conditional statements, and loops. 3. The third unit covers lists, strings, dictionaries, tuples, sets, and importing modules. 4. The fourth unit covers functions, arguments, namespaces, scoping, and modules. 5. The fifth unit covers classes, objects, methods, inheritance, polymorphism, and code reusability. 6. The sixth unit

Uploaded by

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

QUESTION BANK 2023

GOVERNMENT POLYTECHNIC ARVI

COMPUTER ENGINEERING DEPARTMENT

COURSE CODE AND NAME “PROGRAMMING WITH PYTHON 22616

UNIT – 1

1. a) What is an algorithm? Explain characteristics of an algorithm.


b) What are the features and applications of Python?
2. Explain about the input and output statements or methods with example.
1) What is Indentation? Explain with example.
3. a) what is data type? List out the types of data types with example.
b) Explain variable assignment with suitable example.
c) Describe an algorithm for the following
i) Prime number or not
ii) Odd or even
4. Define Flowchart and explain symbols used in flowchart with example.
5. Explain briefly about the Multi-Valued Data types with example.
6. a) Define Variable and mention rules for choosing names of Variable.
b) Implement the python program to calculate total and average marks based on input.
7. Describe the different methods by which we can use Python.
8. How does Python stand out from other languages?
9. Explain in detail the important features of Python
10. What is the core philosophy with which the Python language is created?
11. Explain the significance of Python.
12. Name the libraries in Python.
13. What do you understand by memory management in Python?
14. Explain briefly the steps to install Anaconda.
15. Explain open-source software.

PROGRAMMING WITH PYTHON (22616) Page 1


QUESTION BANK 2023

1. Define algorithm. Explain in detail about the building blocks of algorithm.


2. What is flowchart? Explain the Basic design structures in Flowchart
3. What is pseudo code? Explain its guidelines and benefits.
4. Explain the design structures in pseudo code.
5. Explain the steps involved in program development cycle.
6. Write the python program for the following:
a. Find minimum in a list.
b. Insert a card in a list of sorted cards.
c. Guess an integer number in a range.
d. Towers of Hanoi.
7. Write the python program for the following:
a) To find the sum of square root of any three numbers.
b) To find the sum of first 100 integers.
c) To find the sum of all odd numbers till 100.
d) To find the sum of any five integers.
e) To find the factorial of number n.
f) To find the first n numbers in a Fibonacci series.
g) To find the sum of digits of a number.
h) To find whether a number is prime or not.
i) To convert temperature from Fahrenheit to Celsius
j) To solve the quadratic equation.
k) To find sum first 100 natural numbers.
l) To find factorial of a number.

PROGRAMMING WITH PYTHON (22616) Page 2


UNIT – 2
1. List various types of operators in Python and write any 4 types of operators.
2. Explain in detail about Control flow structures in python.
3. Outline with an example the assignment and bitwise operators supported in Python.
4. a) Write a Python program to print prime number series up to N.
b) Write a Python program to Swapping of two numbers with and without using temporary
variable.
5. a) If the age of Ram, Sam, and Khan are input through the keyboard, write a python program
to determine the eldest and youngest of the three.
b) Arithmetic operations (Addition, Subtraction, Multiplication, and Division) on integers. Input
the two integer values and operator for performing arithmetic operation through keyboard.

b) Explain break and continue statement with the help of for loop with an example.
6. Explain the syntax of the following statements
i) for loop
ii) while loop
iii) if - else
iv) if-elif-else
7. Explain expressions in python with order of evaluation with example.
8. a) Develop a program to find the largest among three numbers.
b) Write a python program to find the given year is leap or not.
9. a) Write a python program to print factorial of a given number
b) Implement Python program to find sum of natural numbers.

PROGRAMMING WITH PYTHON (22616) Page 3


QUESTION BANK 2023

UNIT – 3

1. a) Enumerate the list and its methods with example.


b) Elucidate the string and its methods with example.
2. a) What is dictionary? Explain the methods available in dictionary.
b) Differentiate between the tuple and sets in python.
3. What is the difference between tuples and lists in Python?
4. What are Python's dictionaries?
5. Explain how to create a dictionary in python?
6. Explain what is range () function and how it is used in lists?
7. How lists are updated in Python?
8. Write a few methods that are used in Python Lists.
9. What are the advantages of Tuple over List?
10. What is indexing and negative indexing in Tuple?
11. What is the output of print tuple[1:3] if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?
12. What are the built-in functions that are used in Tuple?
13. How does del operation work on dictionaries? Give an example.
14. Write short note on Functional Programming Approach..
15. What is the difference between Lists and Tuples? Give an example for their usage
16. Explain the purpose of loop structure in a programming language. Describe the
syntax and semantics of any two loop structures provided by Python.
17. Explain the features of a dictionary.
18. What are the three types of import statement in Python? Explain.
19. Write a short note on asserts function.
18 What is the difference between lists, tuples and dictionaries? Give an example for
their usage.
19. What type of conditional structures are present in a programming language? How
many of them are supported in Python? Explain each with example.
20. What are the basic list operations that can be performed in Python? Explain each
operation with its syntax and example
21. What is Dictionary? Explain Python dictionaries in detail discussing its operations
and methods.

PROGRAMMING WITH PYTHON (22616) Page 4


UNIT – 4

1. a) Define function? Write its syntax


b) What are formal and actual arguments
c) Write functions to do all arithmetic operations

2. a) What is recursive function?


b) Explain lambda function
c) Write recursive function to find factorial of a number
3. a) Differentiate key word and default arguments
b) Differentiate global and local variables

4 a Explain in details about namespaces and scoping.


b Explain about the import statement in modules
5 a What are packages? Give an example of package creation in
Python.
b Write a small code to illustrate package in Python.

6 a What are modules in Python?

b How to create a module?

c What is import statement in modules ?

d What is from import statement in modules ?

7. What is module and package in Python?

PROGRAMMING WITH PYTHON (22616) Page 5


UNIT – 5

1 . a) Compare class and object with python code


b) Narrate scope of a variable in a function
2 . a) Write about class constructor(_init_()),self-variable
b) Compare method overloading and overriding
3 . a) A 4 digit integer is entered through the keyboard. Write a function to
Calculate the sum of the 4 digit number both without recursion and using
recursion
b) What are the cons of using functions
4 . What is inheritance? Illustrate types of inheritance with python code
a) Write a function to display ASCII Code of entered character
b) Describe how an object is passed as parameter to a method
5 . a) Write a class with following criteria
Class name: Flower
i. Objects: lilly, rose, hibiscus
ii. Properties:
price,color,smell
Methods: get(),
display()
b. Narrate about polymorphism
6 . a)Write a function to return right most digit in the entered number
b) How do we achieve code reusability in python? Write a python code to
i. Explain code reusability

PROGRAMMING WITH PYTHON (22616) Page 6


QUESTION BANK 2023

UNIT – 6

1 What is an Exception? Explain types of exceptions and give an example.

2 How to create user defined exception in python with an example.

3 a What is module? How many ways to import module in python?


Write a python code to check the given number is prime or not using
b modules

4 a What is searching? Explain with example program.


b What is matching? Explain with example program.

5 a List some few common Exception types and explain when they occur
b Difference between Raising and User defined exceptions in python?

6 a Describe any one regular expression with an example?


b Explain package installation via PIP

7 Write a syntax for Handling Exceptions with example


i try
ii try-except
iii try-except-else
iv try-except-else-finally

PROGRAMMING WITH PYTHON (22616) Page 7


QUESTION BANK 2023

Explain in detail about Python Files, its types, functions and operations that can
8 be performed on files with examples.

9 a Explain about command line arguments


b Explain about reading and writing files in python
10 a Explain about Data Compression
b Explain about Dates and Times
11 a What is mean by Iterators and Generators?
b Write about map and filter in Python?
12 a What is mean by Text File? Explain about reading and writing files in python?
b What is turtle with an example?
13 Explain about Functional Programming.
i Iterators Generators Maps Filters
14 Explain about Mathematics function in python
15 a Explain about Python Runtime Services
b Explain about Data Compression
16 a What is Data Management and Object Persistence
b Explain about Dates and Times

1) Answer the following questions.


a) Write a small code to illustrate try and except statements in Python.
b) What are packages? Give an example of package creation in Python.
c) Compare and contrast Extending and Embedding Python.
d) Write an algorithm to check whether a student is pass or fail, the total
marks of student being the input.
2) Answer the following questions.
a) Write a program to enter a number in Python and print its octal
and hexadecimal equivalent.
b) Demonstrate the use of Exception Handling in Python
3) Answer the following questions.
a) What are modules in Python? Explain
b) Explain in details about namespaces and scoping.
c) Explain about the import statement in modules.
4) Answer the following questions.
a) Explain about the different types of Exceptions in
Python.
b) Describe about Handling Exceptions in detail with examples.
5) Explain in detail about Python Files, its types, functions and operations
that can be performed on files with examples

PROGRAMMING WITH PYTHON (22616) Page 8

You might also like