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

QUESTION BANK - Python Programming

The document is a question bank for Python programming, divided into three modules. Module 1 covers basic concepts such as errors, loops, functions, and arithmetic operations, while Module 2 focuses on string and list methods, as well as indexing and slicing. Module 3 addresses dictionaries, their operations, and includes programming tasks related to statistical calculations and string manipulations.

Uploaded by

naikravi776
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)
4 views2 pages

QUESTION BANK - Python Programming

The document is a question bank for Python programming, divided into three modules. Module 1 covers basic concepts such as errors, loops, functions, and arithmetic operations, while Module 2 focuses on string and list methods, as well as indexing and slicing. Module 3 addresses dictionaries, their operations, and includes programming tasks related to statistical calculations and string manipulations.

Uploaded by

naikravi776
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

PYTHON PROGRAMMING QUESTION BANK – IAT – 1

Module – 1
1. Explain three different types of errors.
2. Differentiate between break and continue statements.
3. Explain variables and keywords with an example.
4. Explain operators and operands with an example.
5. Explain operator precedence and order of operations with examples.
6. Explain functions and return values with an example.
7. Differentiate between for loop and while loop.
8. Explain Values and Data types with an example.
9. Develop a python program to read 2 numbers from the keyboard and
perform the basic arithmetic operations based on the choice. (1-Add, 2-
Subtract, 3-Multiply, 4-Divide).
[Link] a program to find the largest of three numbers.
[Link] a Python program to apply iteration concepts to generate the
Collatz 3n+1 sequence for a user input number.

Module – 2
1. List and explain different types of string method available in Python with
an example.
2. Explain the use of in and not in operators with strings with an example.
3. Explain the find() function with an example.
4. List and explain different types of list method available in Python with an
example.
5. Explain the difference between tuples and lists.
6. Explain the difference between indexing and slicing in Python.
7. Explain tuple packing and unpacking with an example.
8. Explain string traversal using for and while loop.
9. Write a python program to create a list and perform the following
operations
• Inserting an element
• Removing an element
• Appending an element
• Displaying the length of the list
• Popping an element
• Clearing the list
[Link] will be the output? x = [10, 20, 30, 40, 50, 60, 70, 80, 90,100]
i) print(x[2:]) ii) print(x[-3:]) iii) print(x[1:5:1]) iv) print(x[0:7:2])
11. What will the output? x = “Canara Engineering College”
i) print(x[6:]) ii) print(x[-6:]) iii) print(x[5:15]) iv) print(x[3:12:3])

Module – 3
1. Differentiate between Aliasing and Copying in Dictionaries.
2. Explain dictionary operations.
3. Explain dictionary and its key-value pairs.
4. Differentiate between Hashing and Counting Letter in Dictionaries.
5. Read N numbers from the console and create a list. Develop a program to
print mean, variance and standard deviation with suitable messages.
6. Write a program to read a key from the user and check its presence in a
dictionary.
7. Read a multi-digit number (as chars) from the console. Develop a
program to print the frequency of each digit with a suitable message.
8. Develop a Python program to check if a string is a palindrome or not.

You might also like