Model QP
Model QP
Part-A
1. Write an algorithm to find the sum of first ‘N’ natural numbers. (K2) (CO1)
2. What are the simple strategies for developing algorithms? (K1) (CO1)
4. What is Slicing operator in python? Are comments executable statements in a python program?(K1)(CO2)
7. How are the values of tuples accessed? Illustrate with example.(K3) (CO4)
9. Write the syntax for opening a file to write in binary model. (K2)(CO5)
Part B
11. a.i. Explain the different ‘building blocks of algorithm with their notations’?(10) (K2)(CO1)
ii.Draw a flow chart and algorithm to find the sum of the series
1+2+3+4+5+6+…100.(6)(K1,K3).(CO1)
OR
b.State the Tower of Hanoi problem. Outline the program with recursive function and with relevant diagrams.(16)(K2)(CO1)
12. a.i.Explain the python interpreter and interactive mode in detail.(12) (K2)(CO2)
ii.Write a python program to calculate the distance between two points.(4) (K2)(CO2)
OR
b.Explain the types of operators supported by python and explain any two with example programs.(16) (K2)(CO2)
OR
b.i.Outline while loop,break statement and continue statement in python with an example.(12)(K5)(CO3)
ii.Write a python program using function to find the sum of first ‘n’ odd numbers and print result.(4)(K2)(CO3)
14. a.i.Discuss operations ,methods and slices in List and explain with example programs .(12)(K2)
OR
b.Write illustrative program on student marks statement and retail bill preparation.(16)(K2)(CO4)
15. a. Explain in detail about Python Files, its types, functions and operations that can be performed on files with examples. (16)(K2) (CO5).
OR
ii.Write a simple python program to count the numbers of words in the sentence using split method.(8)(K2)(CO5)