0% found this document useful (0 votes)
5 views10 pages

Python Project

Uploaded by

Yuvraj jha
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 views10 pages

Python Project

Uploaded by

Yuvraj jha
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

s.

n List of Programs Sign


o
1 Write a program to print the first 10 natural
numbers using a for loop
2 Write a program to print all even numbers
within a given range (e.g., 1 to 20).
3 Write a program to calculate the sum of all
numbers from 1 to a given number using a
loop.
4 Write a program to print the multiplication
table of a given number (e.g., 7) using a for
loop.
5 Write a program to count the total number of
digits in a given integer.
6 Write a program to accept a word from the
user and reverse it using a loop (without
using slicing).
7 Write a program to check if a given string is
a palindrome using a loop.

8 Write a program to calculate the factorial of


a given number using a loop.
9 Write a program to generate the Fibonacci
series up to a certain number of terms.
10 Write a program to find all prime numbers
within a specified range using nested loops.
11 Write a program to construct a star pattern
using nested loops.
12 Write a program to count the number of even
and odd numbers from 10 numbers entered
by the user. Also, print their separate sums.
13 Compute the GCD of two numbers.

14 Print the Fibonacci series

15 To print a pyramid * ** *** ****

16 .Write a program to check whether a number


is an Armstrong number or not.
17 Write a program to print the sum of all the
primes between two ranges.
18 Write a program to swap two strings

19 Write a menu driven program to accept two


strings from the user and perform the
various functions using user defined
functions.
20 Perform the following operations in a List
a) Break a list into chunks of size
b) Print duplicate numbers of the list
c) Find the count and sum of all even
numbers in a list.
d) Count occurrences of an element in a
list
e) Reversing a List
f) Cloning or copying a list
g) Find the largest number of the list
h) Search if an element exist in the list
i) Find the smallest number of the list
j) Print the first 3 numbers of the list
k) Print any 3 letters from the middle
l) Print the letter from any particular
index to the end of the list
21 Perform following operations in a Sentence =
“This is the Practical List of Python”
a) Remove i’th character from string
b) Check if a Substring is Present in a
Given String
c) Find length of a string
d) Print even length words in a string
e) Count the vowels from a string.
f) Reverse the words of a sentence
g) Change the sentence to lower case
h) Print last 6 characters
i) Print first 6 characters
j) Program to check if a string contains
any special character
k) Check if it is a palindrome or not
22 Perform following operations in Tuple
a) Count the no. of times an element has
been repeated in Tuple
b) Find the index of a particular element.
23 Write a program that scans an email address
and forms a tuple of user name and domain
24 . Perform following operations in Dictionary
a) Find the sum of all items in a dictionary
b) Remove a key from dictionary
c) Sort list of dictionaries by values
d) Merging two dictionaries
25 Create a dictionary whose keys are month
names and whose values are the number of
days in the corresponding months.
a) Ask the user to enter a month name
and use the dictionary to tell them
how many days are in the month.
b) Print out all keys in the alphabetically
order
c) Print out all the months with 31 days
d) Print out the key value pairs sorted by
number of days in each month
26 Find words having frequency more than 3 in
a text read from a file and write those words
in another file
27 Create function Find_Factorial of calculating
factorial between two ranges. (use recursion)
28 Write a program that uses a user defined
function that accepts name and gender (as M
for Male, F for Female) and prefixes Mr./Ms.
on the basis of the gender
29 Programs that take command line arguments
(word count)
30 Write a program to display Bar graphs or Pie
chart using Matplotlib.
31 Write a program that defines a function large
in a module which will be used to find larger
of two values and called from code in
another module
32 Write a program to store students data (Roll
number, name, class,
marks1,marks2,marks3) in a csv file. Find the
percentage of each student and then
calculate the topper of each class
33 Create a Numpy array and perform matrix
operations (any two operations)
Output 1

Output 2

Output 3
Output 4

Outout 5

Output 6
Output 7

Output 8
Output 9

Output 10
Output 11

Output 12
Output 13

Output 14

Output 15
Output 16

Output 17

You might also like