0% found this document useful (0 votes)
10 views2 pages

Python Programming Exercises and Solutions

Uploaded by

shadow2atlas
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Python Programming Exercises and Solutions

Uploaded by

shadow2atlas
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python prep:

Class1:

1) Given three points (x1, y1) , (x2, y2) and (x3, y3) , write a program to
check if all the three points fall on one straight line.

2) Write a python program to solve the pattern :

**

***

****

*****

(b) Taking n rows from user.

3) 1

23

456

7 8 9 10

4) Write a python program to solve the Fibonacci sequence using function:


Fibonacci Sequence: 1, 1, 2, 3, 5, 8, 13…

5) Calculate the factorial value of a number using function/methods in


python.

6) Write a python program to get sum of n numbers in sequence through


recursion/loop.

7) Write a python program to print all the odd and even numbers in
between the range, taken from user, through recursion.

8) Write a program to generate all combinations of 1, 2 and 3 using for


loop.
Class 2:

You might also like