0% found this document useful (0 votes)
8 views16 pages

Python Projects: Grade, Interest, and More

The document outlines a series of computer practical projects, each demonstrating different programming concepts such as percentage calculation, discount calculation, interest calculation, and data manipulation. Each program includes input prompts, processing logic, and output examples. The projects cover a range of topics from basic arithmetic to file operations and SQL commands.

Uploaded by

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

Python Projects: Grade, Interest, and More

The document outlines a series of computer practical projects, each demonstrating different programming concepts such as percentage calculation, discount calculation, interest calculation, and data manipulation. Each program includes input prompts, processing logic, and output examples. The projects cover a range of topics from basic arithmetic to file operations and SQL commands.

Uploaded by

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

COMPUTER PRACTICAL PROJECT

Program 1: Percentage and Grade Calculation


Input:
s1 = int(input("Enter marks in Science: "))
s2 = int(input("Enter marks in Maths: "))
s3 = int(input("Enter marks in English: "))
s4 = int(input("Enter marks in SST: "))
s5 = int(input("Enter marks in Computer: "))

total = s1+s2+s3+s4+s5
per = (total/500)*100

if per < 35:


print("Fail")
else:
print("Pass")
print("Percentage:", per)

Output:
Pass
Percentage: 78.6
Program 2: Discount Calculator
Input:
price = float(input("Enter price: "))
disc = float(input("Enter discount: "))

final = price - (price*disc/100)


print("Final Price:", final)

Output:
Final Price: 850
Program 3: Simple and Compound Interest
Input:
p = float(input("Principal: "))
r = float(input("Rate: "))
t = float(input("Time: "))

si = (p*r*t)/100
ci = p*((1+r/100)**t)-p
print(si, ci)

Output:
500 610.51
Program 4: Vowel Counter
Input:
word = input("Enter word: ")
count = 0
for i in word:
if [Link]() in "aeiou":
count += 1
print(count)

Output:
3
Program 5: Multiples of a Number
Input:
n = int(input("Enter number: "))
for i in range(1,11):
print(n*i)

Output:
5 10 15 ...
Program 6: Fibonacci Series
Input:
n = int(input("Enter terms: "))
a,b=0,1
for i in range(n):
print(a)
a,b=b,a+b

Output:
0 1 1 2 3
Program 7: Sum of Squares
Input:
n = int(input("Enter n: "))
s=0
for i in range(1,n+1):
s+=i*i
print(s)

Output:
55
Program 8: Reverse List
Input:
lst=[1,2,3,4]
for i in range(len(lst)-1,-1,-1):
print(lst[i])

Output:
4 3 2 1
Program 9: File Append
Input:
f=open("[Link]","a")
[Link]("Hello")
[Link]()

Output:
Data added
Program 10: Floyd Triangle
Input:
n=4
num=1
for i in range(1,n+1):
for j in range(i):
print(num,end=" ")
num+=1
print()

Output:
1
2 3
4 5 6
Program 11: Employee Payroll
Input:
basic=10000
da=basic*0.1
hra=basic*0.2
gross=basic+da+hra
print(gross)

Output:
13000
Program 12: Linear Search
Input:
lst=[2,4,6,8]
x=6
for i in range(len(lst)):
if lst[i]==x:
print("Found")

Output:
Found
Program 13: Dictionary Student Record
Input:
stud={"Name":"Amit","Marks":89}
for k,v in [Link]():
print(k,v)

Output:
Name Amit
Marks 89
Program 14: Max and Min
Input:
lst=[4,9,2]
print(max(lst),min(lst))

Output:
9 2
Program 15: Palindrome
Input:
s="madam"
if s==s[::-1]:
print("Palindrome")

Output:
Palindrome
Program 16–24: SQL & MySQL Operations
Input:
SHOW TABLES;
ALTER TABLE STUDENT ADD PRIMARY KEY(id);
DROP TABLE STUDENT;

Output:
Query OK

You might also like