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

Python assignment

python assignment for beginers

Uploaded by

puneet mishra
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)
5 views

Python assignment

python assignment for beginers

Uploaded by

puneet mishra
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
You are on page 1/ 4

BASIC QUESTION

1. Write A Program To Check If A Given Number Is Even Or Odd.


2. Write A Program To Print The Sum Of Two Numbers.
3. Write A Program To Find The Largest Of Three Numbers.
4. Write A Program To Check If A Given Year Is A Leap Year.
5. Write A Program To Find The Factorial Of A Given Number.
6. Write A Program To Check If A Given String Is A Palindrome.
7. Write A Program To Reverse A Given Number.
8. Write A Program To Find The Sum Of Digits Of A Number.
9. Write A Program To Count The Number Of Vowels In A String.
10.Write A Program To Find The Greatest Common Divisor (GCD) Of Two Numbers.
11.Write A Program To Generate The Fibonacci Series Up To A Given Number.
12.Write A Program To Find The Sum Of Elements In A List.
13.Write A Program To Find The Second Largest Element In A List.
14.Write A Program To Remove Duplicates From A List.
15.Write A Program To Check If A Number Is A Prime Number.
16.Write A Program To Sort A List Without Using The Built-In Sort Function.
17.Write A Program To Check If Two Strings Are Anagrams.
18.Write A Program To Count The Occurrences Of Each Character In A String.
19.Write A Program To Find The Median Of A List.
20.Write A Program To Find The Sum Of All Even Numbers In A List.
Pattern-Based Questions
21.Print The Following Pattern:
*
**
***
****

22.Print The Following Pattern:


1
22
333
4444

23.Print The Following Pattern:


*
**
***
****

24.Print The Following Pattern:


1
12
123
12 3 4

25.Print The Following Pattern:


1234
123
12
1

26.Print The Following Pattern:

****
* *
* *
****

27.Print The Following Pattern:


1
23
456
7 8 9 10
28.Print The Following Pattern:
A
AB
ABC
ABCD
29.Print The Following Pattern:
1
23
456
7 8 9 10
Program to print full pyramid using *
*
***
*****
*******
*********
Advanced Questions

31.Write A Program To Find All Prime Numbers Up To A Given Number.


32.Write A Program To Count The Frequency Of Each Word In A Sentence.
33.Write A Function To Check If A Given Number Is A Strong Number.
34.Write A Program To Calculate The Power Of A Number Without Using The ** Operator.
35.Write A Recursive Function To Find The Factorial Of A Number.
36.Write A Program To Find The LCM Of Two Numbers.
37.Write A Program To Sort A List Of Tuples Based On The Second Element.
38.Write A Function To Find The Nth Fibonacci Number Using Recursion.
39.Write A Program To Find All Armstrong Numbers In A Given Range.

You might also like