Python Project
Name: Rahul Agata
Roll No: 638
Registration No: 7373838393
Semester: BCA 3rd Semester
College: Silda Chandrasekhar College
University: Vidyasagar University
Certificate
This is to certify that Mr. Rahul Agata, Roll No: 638, Registration No: 7373838393, a student of BCA
3rd Semester, Silda Chandrasekhar College under Vidyasagar University, has successfully
completed the Python programming mini project as part of the curriculum during the academic
session.
The project contains basic to intermediate level Python programs developed and executed by the
student.
Acknowledgement
I would like to express my heartfelt gratitude to our faculty and the entire department of Computer
Applications for their guidance and support during this project.
Special thanks to our respected teacher for giving me the opportunity to work on this Python project
which helped me improve my programming skills and logical thinking.
Index
1. Basic Billing System
2. Student Marksheet Generator
3. Simple Calculator
4. Simple Interest Calculator
5. Armstrong Number Checker
6. Palindrome String Checker
7. Factorial Using Loop
8. Fibonacci Series Generator
9. Temperature Converter
10. Prime Number Checker
11. Number Guessing Game
12. Vowel and Consonant Counter
13. Area of Circle and Rectangle
14. File Handling - Write & Read
15. Login System
Program 1: Basic Billing System
Aim:
To write a Python program for basic billing system.
Code:
items = []
while True:
name = input("Enter item name (or 'done' to finish): ")
if name.lower() == 'done':
break
price = float(input("Enter item price: "))
qty = int(input("Enter quantity: "))
items.append((name, price, qty))
print("\n--- BILL ---")
total = 0
for name, price, qty in items:
line_total = price * qty
total += line_total
print(f"{name} - Rs.{price} x {qty} = Rs.{line_total}")
print("Total Amount: Rs.", total)
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 2: Student Marksheet Generator
Aim:
To write a Python program for student marksheet generator.
Code:
name = input("Enter student name: ")
marks = []
for i in range(5):
mark = float(input(f"Enter marks for subject {i+1}: "))
marks.append(mark)
total = sum(marks)
average = total / 5
print("Total:", total)
print("Average:", average)
print("Grade:", "A" if average >= 80 else "B" if average >= 60 else "C")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 3: Simple Calculator
Aim:
To write a Python program for simple calculator.
Code:
a = float(input("Enter first number: "))
b = float(input("Enter second number: "))
op = input("Enter operation (+, -, *, /): ")
if op == '+':
print("Result:", a + b)
elif op == '-':
print("Result:", a - b)
elif op == '*':
print("Result:", a * b)
elif op == '/':
print("Result:", a / b if b != 0 else "Cannot divide by zero")
else:
print("Invalid operator")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 4: Simple Interest Calculator
Aim:
To write a Python program for simple interest calculator.
Code:
p = float(input("Enter principal amount: "))
r = float(input("Enter rate of interest: "))
t = float(input("Enter time in years: "))
si = (p * r * t) / 100
print("Simple Interest:", si)
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 5: Armstrong Number Checker
Aim:
To write a Python program for armstrong number checker.
Code:
num = int(input("Enter a number: "))
power = len(str(num))
total = sum(int(digit)**power for digit in str(num))
print("Armstrong Number" if total == num else "Not an Armstrong Number")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 6: Palindrome String Checker
Aim:
To write a Python program for palindrome string checker.
Code:
s = input("Enter a string: ")
if s == s[::-1]:
print("Palindrome")
else:
print("Not a Palindrome")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 7: Factorial Using Loop
Aim:
To write a Python program for factorial using loop.
Code:
n = int(input("Enter a number: "))
fact = 1
for i in range(1, n+1):
fact *= i
print("Factorial:", fact)
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 8: Fibonacci Series Generator
Aim:
To write a Python program for fibonacci series generator.
Code:
n = int(input("Enter number of terms: "))
a, b = 0, 1
print("Fibonacci Series:")
for _ in range(n):
print(a, end=" ")
a, b = b, a + b
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 9: Temperature Converter
Aim:
To write a Python program for temperature converter.
Code:
temp = float(input("Enter temperature: "))
scale = input("Convert to (C/F): ").upper()
if scale == "F":
print("In Fahrenheit:", (temp * 9/5) + 32)
elif scale == "C":
print("In Celsius:", (temp - 32) * 5/9)
else:
print("Invalid scale")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 10: Prime Number Checker
Aim:
To write a Python program for prime number checker.
Code:
num = int(input("Enter a number: "))
if num < 2:
print("Not Prime")
else:
for i in range(2, int(num**0.5)+1):
if num % i == 0:
print("Not Prime")
break
else:
print("Prime")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 11: Number Guessing Game
Aim:
To write a Python program for number guessing game.
Code:
import random
num = random.randint(1, 10)
guess = int(input("Guess a number (1-10): "))
if guess == num:
print("Correct!")
else:
print(f"Wrong! The number was {num}")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 12: Vowel and Consonant Counter
Aim:
To write a Python program for vowel and consonant counter.
Code:
s = input("Enter a string: ").lower()
vowels = 'aeiou'
v = c = 0
for ch in s:
if ch.isalpha():
if ch in vowels:
v += 1
else:
c += 1
print("Vowels:", v, "Consonants:", c)
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 13: Area of Circle and Rectangle
Aim:
To write a Python program for area of circle and rectangle.
Code:
shape = input("Enter shape (circle/rectangle): ").lower()
if shape == "circle":
r = float(input("Enter radius: "))
print("Area of Circle:", 3.1416 * r * r)
elif shape == "rectangle":
l = float(input("Enter length: "))
b = float(input("Enter breadth: "))
print("Area of Rectangle:", l * b)
else:
print("Unknown shape")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 14: File Handling - Write & Read
Aim:
To write a Python program for file handling - write & read.
Code:
with open("testfile.txt", "w") as f:
f.write("Hello, this is a test file.")
with open("testfile.txt", "r") as f:
print("File Content:", f.read())
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Program 15: Login System
Aim:
To write a Python program for login system.
Code:
username = input("Enter username: ")
password = input("Enter password: ")
if username == "admin" and password == "1234":
print("Login successful")
else:
print("Invalid credentials")
Sample Output:
Output will depend on user input. Run the program in a Python IDE.
Conclusion
This Python project has helped me learn fundamental and intermediate level programming concepts
like loops, conditionals, functions, input/output, and file handling.
By completing these programs, I feel more confident in implementing real-world logic using Python.