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

Write A Program To 1.: List of Programs For Practical File

The document provides a list of 20 programming tasks for practical file assignments. Each task involves user input and various operations such as checking evenness, calculating factorials, replacing words in strings, and performing mathematical operations. The tasks aim to enhance programming skills through practical applications in Python.

Uploaded by

106862
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

Write A Program To 1.: List of Programs For Practical File

The document provides a list of 20 programming tasks for practical file assignments. Each task involves user input and various operations such as checking evenness, calculating factorials, replacing words in strings, and performing mathematical operations. The tasks aim to enhance programming skills through practical applications in Python.

Uploaded by

106862
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/ 2

LIST OF PROGRAMS FOR PRACTICAL FILE

Write a program to
1. Take user input for a number and check whether it is even or not.Display appropriate message.
2. Check whether a character entered by a user is a vowel or not.
3. Print a multiplication table of a number entered by the user using a for loop.
4. Display all even numbers upto a range of n, where n is entered by the user.
5. Display all the factors of a number entered by the user.
6. Create a list of 10 numbers based on the user's choice. Replace all negative numbers by zero and
print the final list.
7. Find the factorial of a number entered by the user.
8. Replace the word ‘planet’ by ‘Earth’ in the string, “plant more trees and save the planet’.
9. Check if the number entered by the user is prime or not.
10. Take a string from the user and display the length of the string.
11. Use eval to input a list of any number of elements from the user. Replace the list items by their
squares and display the new list.
12. Take a string from the user and count the vowels in the string.Also, Display the string in uppercase
and number of vowels and consonants in the string.
13. Take a sentence from the user. Also take starting and ending positions to slice the string. Display
the sliced part of the string.
14. Create a menu driven program to perform all the basic mathematical operations for the two
numbers entered by the user.
15. Take marks (out of 100) in five subjects from the user. Calculate the percentage marks and
display appropriate message according to the table given below:
Percentage Message
0 to 33 Fail
33 to 60 Pass
60 to 75 Pass with First Division
75 and above Pass with Distinction
16.Write a program which initializes a list with the values[1,2,3,4,5].The program should ask the users for an index and
a new value,replace the value at the given index and print the list again.
17.Write a program that accepts principal,rate of interest and time and calculate simple interest.
18.Write a program to return max,min and sum of all items in a list
19."Write a program using if-elif statements to assign grades (A, B, or C) to students based on their marks:

● Grade A → marks ≥ 75

● Grade B → 33 ≤ marks < 75

● Grade C → marks < 33"**

20.Write a program that accepts length,breadth of a rectangle and calculate its area and perimeter.

You might also like