17cs664 QP - 1 - IA2020
17cs664 QP - 1 - IA2020
17cs664 QP - 1 - IA2020
Note: Answer any two full questions, choosing one from each module
b. Explain the Chained Conditionals and Nested Conditionals with example program to 10 L1, CO1
check a year is leap year or not L2
Module 2
3 a. Discuss looping constructs in Python along with demonstration of break and continue 10 L1, CO2
statements. L2
b. Write a Python function to get a string made of the first 2 and the last 2 chars from a given 5 L1, CO2
string. If the string length is less than 2, return empty string, otherwise return new string
L2
created.
OR
4 a. Discuss pros and cons of read(), open() and write() function on files and write a program 10 L1, CO2
to read and display the contents , count the number of lines and find the word whose L2
count is more in f1 and f2 respectively
b. Write a python program to generate first n Fibonacci number and factorial of n using 5 L1, CO2
functions L2
CO1- Examine Python syntax and semantics and be fluent in the use of Python flow control and functions.
CO2 – Demonstrate proficiency in handling Strings and File Systems.