Professional Documents
Culture Documents
QB For Introduction To Python Programming
QB For Introduction To Python Programming
2. a) Describe a method to access a global variable inside a function in Python CO1 L2 04M
with an example?
b) Explain the use of comparison operators in Python programming, and CO1 L2 06M
illustrate their functionality with a Python code example.
3. a) Recall Len ( ) function and explain how it is used on strings with an CO1 L2 04M
example.
b) Outline logical operators and arithmetic operator with a suitable example CO1 L2 06M
for each.
OR
4. a) Describe the purpose of using break and continue with suitable examples. CO2 L2 04M
b) Express why would you use a try-except statement in a program? CO2 L2 06M
5. Write a program to read the student details like Name, USN, and Marks in three CO2 L3 05M
subjects. Display the student details, total marks and percentage with suitable
messages.
OR
6. Determine whether you should use tuples or lists to store the student information. CO2 L3 05M
Justify your choice with suitable examples.