The document is a question bank for a Python programming course covering topics from Unit 3 and Unit 4. It includes questions on local and global variables, string functions, control flow statements, data structures like lists and dictionaries, and algorithms such as linear and binary search. Additionally, it features programming exercises for practical application of the concepts discussed.
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 ratings0% found this document useful (0 votes)
10 views2 pages
QuestionBank Unit3and4
The document is a question bank for a Python programming course covering topics from Unit 3 and Unit 4. It includes questions on local and global variables, string functions, control flow statements, data structures like lists and dictionaries, and algorithms such as linear and binary search. Additionally, it features programming exercises for practical application of the concepts discussed.
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/ 2
GE3151 & Problem Solving and Python Programming
Question Bank for Unit3 and Unit4
Part-A 1.Comment with an example on the use of local and global variable with the same identifier name 2.What are the purposes of pass statement in Python? 3.Write a program to find sum of array elements. 4.Define Fruitful Function. 5.Present the flow of execution for a while statement. 6.In Python, how the values stored in a tuple are accessed? Should the elements of a list be of the same data type? 7.What is Linear Search? 8.Define a string. How to get a string at run time. 9.Differentiate the break and continue. 10.In Python, how the values stored in a list are accessed? Should the elements of a list be of the same data type? 11.What is range() function and how it is used in lists? 12.Relate String and List 13.Write a program to find the value of sum of series 1+2+3+….+n using recursion 14.How Pythons dictionaries store data? Give example. 15.What are the advantages of Tuple over List? 16.What is list cloning? Part-B 1. Write a python program that displays all the numbers from 1 to n numbers that are not divisible by 2 as well as by 3. Get the n value as user input. 2. What is the string function in python? Explain any three python string methods with an example. 3. Outline the conditional branching statements in Python with an example. 4. Write a program to generate electricity bill based upon the no. of units consumed. Refer to the table below for unit and price details. 5. Explain the syntax and structure of User defined functions in python using examples. Also write the parameter passing in functions. 6. Illustrate the binary search algorithm with time complexity and write a python to implement the same using the recursive method. 7.List out the control flow statements in python and explain repetition type in detail with sample program. 8.Write a Python program using functions to find the sum of first ‘n’ odd numbers and print the result. 9. Briefly explain about function prototypes with example program 10.Write a program to perform search operation which sequentially checks each element of the list until a match is found or the whole list has been searched? 11.Define python Lists. How to add elements to the list? Explain with a suitable example program. 12.Write a simple sorting python program to sort different data types. 13.What is tuples? Explain Python tuples methods in detail with a suitable example program. 14.Write a python program to create a dictionary and sort the contents based on values in reverse order. 15.Discuss Python dictionaries and list some of their methods with suitable program. 16.What are the basic list operations that can be performed in Python? Explain each operation with its syntax and example. 17.Write a python program to find the square root of a number without using inbuilt function and explain the same. 18.Demonstrate with python code of the various operations that can be performed on tuples. 19.Write a python program to create a dictionary and sort the contents based on values in reverse order. 20.What is Dictionary? Explain Python dictionaries in detail and discuss its operations with suitable program.