Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
61 views

Python Question Bank-1

Uploaded by

Hakeem Zubeda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Python Question Bank-1

Uploaded by

Hakeem Zubeda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Bapuji Educational Association ®

Bapuji Institute of Engineering and Technology, Davangere–577 004


Department of CSE and ISE

QUESTION BANK

1. What is the need for role of precedence? Illustrate the rules of precedence in Python
with example.
2. Demonstrate with an example print (), input(), len(), str(), int() and float().
3. What are Comparison and Boolean operators? List all the Comparison and Boolean
operators in Python and explain the use of these operators with suitable examples.
4. Explain negative indexing, all methods in slicing and sort( ) in List with suitable example.
5. What are the different flow control statements supported in python? Explain any 2 with
a suitable example program.
6. Define Function. Illustrate function Call, Pass, Argument and Parameter with suitable
example.
7. Explain the local scope and global scope with suitable example.
8. Summarize List concatenation, Replication, updating and removing values in a list with
an example.
9. What is a dictionary? Write a python program to store data about your friend’s Birthday
using dictionary with the names as Keys and Birth dates as values.
10. Discuss get (), item (), keys () and values () dictionary methods in python with examples.
11. With an example code explain join () and split () string methods.
12. What is List? Explain the following cases with suitable examples.
i. Getting Individual Values in a List
ii. Negative Indexes
iii. Getting a List from Another List with Slices
iv. Changing Values in a List
13. How exceptions are handled in Python? Write a Python program with exception
handling code to solve divide-by-zero error situation.
14. Explain i) list concatenation and replication ii) in and not in operators iii) passing
references iv) copy() and deepcopy()
15. Develop a program to read the student details like Name, USN, and Marks in three
subjects. Display the student details, total marks and percentage with suitable
messages.
16. Develop a program to read the name and year of birth of a person. Display whether the
person is a senior citizen or not.
17. Develop a program to generate Fibonacci sequence of length (N). Read N from the
console.
18. Write a function to calculate factorial of a number. Develop a program to compute
binomial Coefficient (Given N and R).
19. Read N numbers from the console and create a list. Develop a program to print mean,
variance and standard deviation with suitable messages.
20. Read a multi-digit number (as chars) from the console. Develop a program to print the
frequency of each digit with suitable message.

You might also like