MODULE 1 Previous University Questions
MODULE 1 Previous University Questions
MODULE 1 Previous University Questions
PART A
PART B
1. Write a python program to generate the following type of pattern for the given N
rows .
1
12
123
1234
2. Mention the different types of loop and control statements allowed in Python
and explain each type with suitable examples.
3. Write the python program to print all prime numbers less than 1000.
4. Write a Python program to find distance between two points (x1,y1) and (x2,y2).
5. Write a Python program to find the roots of a quadratic equation, ax2+ bx + c =0 .
Consider the cases of both real and imaginary roots.
6. Write a Python program to check whether a number is Armstrong number or not.
7. Write a Python program to display the sum of odd numbers between a programmer
specified upper and lower limit.
Given the value of x, write a Python program to evaluate the following series upto n
terms:
𝑥2 𝑥 3
1+𝑥+ + +…
2! 3!
8. Write a python program to find the sum of the cosine series 1 - x^2/2! + x^4/4!-
.......:
9. Write a python program to find X^Y or pow(X,Y) without using standard function.
10. Write a python program to generate the following type of pattern for the given N
rows where N <= 26.
A
AB
ABCD
ABCDE
11. Write a python program to generate prime numbers within a certain range.
12. Discuss the steps involved in the waterfall model of software development process
with the help of a neat diagram.
13. Write a Python program to print all numbers between 100 and 1000 whose sum of
digits is divisible by 9.
14. Illustrate the use of range() in Python.
15. Write a Python program to print all prime factors of a given number.
16. Write a Python code to check whether a given year is a leap year or not
[An year is a leap year if it’s divisible by 4 but not divisible by 100 except for those
divisible by 400].
17. What are the possible errors in a Python program. Write a Python program to print the
value of 22n+n+5 for n provided by the user.
18. Write a Python program to find the value for sin(x) up to n terms using the series
where x is in degrees
𝑥 𝑥3
sin(𝑥) = 1!- 3!
19. Write a Python code to determine whether the given string is a Palindrome or not
using slicing. Do not use any string function.