You are on page 1of 8

Class XI-Computer

Science Project
Bank Management System:

import random
names=[]
accnos=[]
addresses=[]
blgs=[]
dobs=[]
ph_nos=[]
panno=[]
aano=[]
bals=[]
pins=[]
c=0
while True:
print(" Welcome to our Bank ")
print("Press 1 to open a new Savings Account")
print("Press 2 to check your balance")
print("Press 3 to deposit money into your account")
print("Press 4 to withdraw money from your account")
print("Press 5 for Fixed Deposit")
print("Press 6 to exit")
x=int(input("Enter your choice"))
if(x==1):
print("Please enter the following Details required to open a savings
account")
acc=random.randint(100000,999999)
accnos.append(acc)
name=input("Enter your Name")
names.append(name)
address=input("Enter your address")
addresses.append(address)
dob=input("Enter Date of birth")
dobs.append(dob)
ph_no=int(input("Enter your phone number"))
ph_nos.append(ph_no)
blg=input("Enter your blood group")
blgs.append(blg)
pno=int(input("Enter your PAN number"))
panno.append(pno)
ano=int(input("Enter your Aadhar number"))
aano.append(ano)
pin=int(input("Enter your new 4-digit pin"))
pins.append(pin)
while True:
bal=int(input("Enter initial amount to be deposited"))
if(bal<2000):
print("Minimum balance to be deposited is 2000")
continue
else:
break
bals.append(bal)
print("Account Creation Successful :)")
print("Your account number is", acc)
print("Your account code is ", c)
b=input("Do you want to display all the details (y/n)")
if(b=='y' or b=='Y'):
a=int(input("Enter your account code"))
print("Name is ", names[a])
print("Address is ", addresses[a])
print("Date of birth is ", dobs[a])
print("Phone number is ", ph_nos[a])
print("Blood group is ", blgs[a])
print("PAN number is ", panno[a])
print("Aadhar number is ", aano[a])
print("Balance is ", bals[a])
print("Pin is ", pins[a])
print()
print()
c=c+1
continue
elif(x==2):
code=int(input("To check balance, Enter your account code"))
while True:
in_pin=int(input("Enter your pin"))
if(in_pin==pins[code]):
print("The balance is ", bals[code])
break
else:
print("Wrong pin entered")
continue
continue
elif(x==3):
code=int(input("To Deposit balance, Enter your account code"))
while True:
in_pin=int(input("Enter your pin"))
if(in_pin==pins[code]):
in_bal=int(input("Enter the amount to be deposited"))
bals[code]=bals[code]+in_bal
print("New Balance is ", bals[code])
break
else:
print("Wrong pin entered")
continue
continue
elif(x==4):
code=int(input("To Withdraw balance, Enter your account code"))
while True:
in_pin=int(input("Enter your pin"))
if(in_pin==pins[code]):
in_bal=int(input("Enter the amount to be Withdrawn"))
bals[code]=bals[code]-in_bal
print("New Balance is ", bals[code])
break
else:
print("Wrong pin entered")
continue
continue
elif(x==5):
while True:
endbal=0
print("Interests for fixed deposit are: ")
print("Amount 5000-50000, Interest-2.2% per annum")
print("Amount 50001-300000, Interest-3.2% per annum")
print("Amount 30001-600000, Interest-4.8% per annum")
print("Amount 600001-, Interest-6% per annum")
amt=int(input("Enter your ammount"))
time=int(input("Enter your time in years"))
if(amt<5000):
print("Minimum balance for a fixed deposit is 5000")
continue
elif(amt>=5000 and amt<=50000):
endbal= amt+((2.2/100)*amt)
print("The amount at Maturity will be", endbal)
break
elif(amt>=500001 and amt<=300000):
endbal= amt+((3.2/100)*amt)
print("The amount at Maturity will be", endbal)
break
elif(amt>=300001 and amt<=60000):
endbal= amt+((4.8/100)*amt)
print("The amount at Maturity will be", endbal)
break
elif(amt>=600001):
endbal= amt+((6/100)*amt)
print("The amount at Maturity will be", endbal)
break
continue
elif(x==6):
break
else:
print("Wrong Input")

Rock Paper Scissors:


import random
print(" Welcome to a game of Rock Paper Scissors ")
print("For rock, press 1 or 'Rock'")
print("For paper, press 2 or 'Paper'")
print("For scissor, press 3 or 'Scissor'")
x=input("Enter your choice")
x=x.lower()
if(x=='rock' or x=='1' ):
y=random.randint(1,3)
if(y==1):
print("The computer selected rock too!")
print("Its a Draw")
elif(y==2):
print("The computer selected paper")
print("Sorry, you lost :(")
else:
print("The computer selected scissors")
print("You WINNN!")
elif(x=='paper' or x=='2' ):
y=random.randint(1,3)
if(y==1):
print("The computer selected rock")
print("You WINNN!")
elif(y==2):
print("The computer selected paper too!")
print("Its a Draw")
else:
print("The computer selected scissors")
print("Sorry ,you lost :(")
elif(x=='scissor' or x=='3' ):
y=random.randint(1,3)
if(y==1):
print("The computer selected rock")
print("Sorry ,you lost :(")
elif(y==2):
print("The computer selected paper")
print("You WINNN!")
else:
print("The computer selected scissors too!")
print("Its a Draw")
else:
print("Invalid choice")
print("*USEFUL TIP* Kindly read with your eyes not ears")

You might also like