0% found this document useful (0 votes)
2 views

Assignment 4

Ip 11

Uploaded by

jadhavpraved167
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Assignment 4

Ip 11

Uploaded by

jadhavpraved167
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assignment 4

1. Enter a number and check whether it is odd or even.

2. Enter two numbers and check whether they are divisible by each
other. (e.g. 10 is divisible by 2)

3. Write a program to print the area of triangle, square, circle or


rectangle based on the user’s choice.

4. Write program to print the following series:

1 4 7 10........40
1 -4 7 -10.........-40

5. Write a program to count the number of vowels in string given by


user. (e.g the string given by user “Hello” then no. of vowels are 2)

6. Write a program to print the square of numbers 1 to 10 using


while loop.

7. Find the factorial of given number.


ex. n!=n*(n-1)*(n-2)........3*2*1

8. Print the first 10 terms of Fibonacci series


o/p should be : 0 1 1 2 3 5 8 13 21 34

9. WAP to generate a table of a number inputted by a user using


While loop.

10 WAP to enter numbers as long as user wishes to enter and find the
sum of highest and lowest number entered by user.

11 Write a python program to print the following pattern:


1
12
1 23
1234
12. Write a python program to print the following pattern:

55555
4444
333
22
1

13.Write a python program to print the following pattern:


2
444
6666
88888

14.Write a python program to print the following pattern:


*
**
***
****

You might also like