import pandas as pd
usid=[4285, 4286, 4287, 4288, 4289, 4290]
pasd=[7281, 7282, 7283, 7284, 7285, 7286]
nam=["ANURAG KUMAR","SAURAV KUMAR"," RAUSHAN KUMAR", "SUMANT KUMAR", "ANKIT KUMAR", "RAM KUMAR"]
df1={"USER_ID":usid, "PASWORD":pasd, "NAME":nam}
dtf1=pd.DataFrame(df1)
dtf1.to_csv("/storage/emulated/0/admin id.docx")
print(dtf1)
USERID
import pandas as pd
s1={"USER_ID":[11417,11418,11419,11420,11421,11422],"PASWORD":[7281,7282,7283,7284,7285,7286] , "MOB":["8102188049","7281942276","8404840621","1234567890","0987654321","5432167890"],"ADRESS":["sarvodaya nagar","TOWNSHIP","delhi","punjab","amritsar","patna"] ,"NAME":["ANURAG KUMAR","SAURAV KUMAR","RAUSHAN KUMAR","SHYAM","GEETA","SITA"] }
s12=pd.DataFrame(s1)
print(s12)
s12.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
PRODUCT DETAILS
import pandas as pd
proid=[1234,1235,1236,1237,1238,1239,1240,1241,1242]
nrate=[80,5,3,60,5,10,40,40,200]
status=["AVAILABLE","AVAILABLE","AVAILABLE","AVAILABLE","AVAILABLE","AVAILABLE","AVAILABLE","NOT AVAILABLE","AVAILABLE"]
prod=["RICE","PENCIL","ERASER", "COPY", "TOFEE","PEN","MILK","TOOTHPASTE","BOOK"]
df1={"PRODUCT_ID":proid,"PRODUCT":prod, "NORMAL_RATE":nrate,"STATUS":status}
dtf1=pd.DataFrame(df1)
print(dtf1)
dtf1.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
DISCOUNT
import pandas as pd
userid=[11417,11418,11419,11420,11421,11422]
payamt=[0,0,0,0,0,0]
dis=[0,0,0,0,0,0]
df1={"USER_ID":userid,"PAYMENT":payamt, "DISCOUNT":dis}
dtf1=pd.DataFrame(df1)
print(dtf1)
dtf1.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
STORE MANAGEMENT SYSTEM
import pandas as pd
import numpy as np
print("WELCOME TO STORE MANAGEMENT SYSTEM")
term_and_con="Dear user using this software you have to allow the terms and condition."
print(term_and_con)
term_and_condition="TERMS AND CONDITION"
print(term_and_condition)
print("1. To usethis software you must be fullfill our requirements")
print(" a. User cannot modify the source code even the source code")
print(" b. user cannot copy this source code for any purpose")
print("2. Only admin can modify the source code")
print("3. copying may be done when admin allows")
print("Are you accepting TERMS AND CONDITIONS")
print("press 1 for Agree")
print("press 2 for Not agree")
choice=int(input("enter your choice"))
if choice==2:
print("Thanks for giving vauable Time")
elif choice==1:
admin=0
while admin!=3:
print("Thanks for aggary terms and condition")
print("BG GENERAL STORE")
print("SARVODAYA NAGAR, BEGUSARAI")
print("BIHAR 851129")
print("MOB NO-8102188049 ,email-anuragvatsbgs@gmail.com")
print("logging by Admin")
print("1. for yes")
print("2. for no")
admin=int(input("enter your choice"))
if admin==1:
adm1=int(input("ADMIN ID"))
adm2=int(input("PASWORD"))
dt2=pd.read_csv("/storage/emulated/0/admin id.docx")
dtf1=pd.DataFrame(dt2)
flag=0
for(row,rowseries)in dtf1.iterrows():
if rowseries["USER_ID"]==adm1 and rowseries["PASWORD"]==adm2:
flag=1
if flag==1:
af1=0
while af1!=8:
print("Login by admin")
print(" 1.Search")
print(" 2.To modify user id")
print(" 3.for delete user id")
print(" 4.for see all user id details")
print(" 5.add new user id")
print(" 6.product operation")
print(" 7.to show bill and discount")
print(" 8.EXIT")
af1=int(input("enter your choice"))
ad1=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
if af1==1:
ad1.drop("Unnamed: 0",axis=1,inplace=True)
b=int(input("enter your user id : "))
a=len(ad1)
for i in range(a):
ch=ad1.iat[i,0]
if ch==b :
print(ad1.iloc[i:i+1,:])
elif af1==2:
ad1.drop("Unnamed: 0",axis=1,inplace=True)
b=int(input("enter your user id : "))
print("1 - to change user id , 2 - to change password , 3 - to change mob")
print("4 - to change adress , 5 - to change name ")
c=int(input("Enter your choice : "))
a=len(ad1)
for i in range(a):
ch=ad1.iat[i,0]
if ch==b:
e=input( "your new value : ")
ad1.iat[i,c-1]=e
print(ad1.iloc[i:i+1,:])
ad1.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
elif af1==3:
ad1.drop("Unnamed: 0",axis=1,inplace=True)
b = int(input("enter your user id : "))
a = len(ad1)
for i in range(a):
ch=ad1.iat[i,0]
if ch== b:
ad1.drop([i],axis = 0,inplace=True)
ad1.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
print(ad1)
break
elif af1==4:
ad1.drop("Unnamed: 0",axis=1,inplace=True)
print(ad1)
print("press any no for exist")
a1=int(input("enter your choice"))
elif af1==5:
q1=input("NAME")
q2=input("NEW USER ID")
q3=input("CONFORM USER ID")
if q2==q3:
print("MACHED")
else:
print("user id can not mached")
q4=input("pasword")
q5=input("conformd pasword")
if q4==q5:
print("MACHED PASWORD")
else:
print("pasword does not mached")
q6=int(input("mobile no."))
q7=input("Adress")
ad1.loc[len(ad1.index)]=[len(ad1.index),q3,q5,q6,q7,q1]
a3=ad1.drop("Unnamed: 0",axis=1,inplace=True)
print(ad1)
ad1.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
elif af1==6:
aj=0
while aj!=5:
print(" 1. see all product")
print(" 2. modify product")
print(" 3.add new product")
print(" 4.delete product")
print(" 5.Exist")
aj=int(input("enter your choice"))
if aj==1:
aqw=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
aqw.drop("Unnamed: 0",axis=1,inplace=True)
print(aqw)
if aj==2:
ad3=pd.read_csv("/storage/emulated/0/WhatsApp seBusiness/Media/python/product.docx")
print(" 1.change product_id ")
print(" 2.modify product")
print(" 3.modify rate")
print(" 4.change status")
ai=int(input("enter your choice"))
ad3.drop("Unnamed: 0",axis=1,inplace=True)
w=int(input("enter product_id : "))
q=len(ad3)
for i in range(q):
ch=ad3.iat[i,0]
if ch==w:
e=input( "your new value : ")
ad3.iat[i,ai-1]=e
print(ad3.iloc[i:i+1,:])
ad3.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
if aj==3:
q1=input("PRODUCT_ID")
q2=input("CONFORM PRODUCT_ID")
if q1==q2:
print("MACHED")
else:
print("PRODUCT_id can not mached")
q3=input("PRODUCT")
q4=float(input(" RATE"))
q6=input("STATUS")
ad3=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
ad3.drop("Unnamed: 0",axis=1,inplace=True)
ad3.loc[len(ad3.index)]=[q2,q3,q4,q6]
print(ad3)
ad3.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
if aj==4:
ad3=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
ad3.drop("Unnamed: 0",axis=1,inplace=True)
b = int(input("enter product id : "))
a = len(ad3)
for i in range(a):
ch=ad3.iat[i,0]
if ch== b:
ad3.drop([i],axis = 0,inplace=True)
ad3.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
print(ad3)
break
elif af1==7:
ad6=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
ad6.drop("Unnamed: 0",axis=1,inplace=True)
print(ad6)
else:
print("invild input")
else:
print("Invalid")
elif admin==2:
userid=int(input("CUSTOMER ID/USER ID"))
paswd=float(input("PASWORD"))
exp1=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/user id.docx")
dtf1=pd.DataFrame(exp1)
flag=0
for(row,rowseries)in dtf1.iterrows():
if rowseries["USER_ID"]==userid and rowseries["PASWORD"]==paswd:
flag=1
if flag==1:
ap=0
while ap!=5:
print("Welcome")
print("press the key that you want to do")
print(" 1. LIST OF ITEMS\n 2. SEARCH ITEMS WITH PRICE\n 3. SEE ALL ITEMS/PRODUCTS")
print(" 4. PLAY QUIZ AND WIN DISCOUNT")
print(" 5. EXIST")
ap=int(input("enter your choice"))
if ap==1:
ad2=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
ad2.drop("Unnamed: 0",axis=1,inplace=True)
print("1.QUANTITIVE PRODUCT")
print("2.VOLUMATRIC PRODUCT")
ak=int(input("enter your choice"))
w=input("PRODUCT NAME ..")
if ak==1:
aa=float(input("quantuty"))
q=len(ad2)
for i in range(q):
ch=ad2.iat[i,2]
ch1=ad2.iat[i,1]
if ch1==w:
print("1. for new user")
print("2. existing user")
ri=int(input("enter your choice"))
if ri==1:
a1=ch*aa
print("you have to pay",a1)
print("pay now")
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
qe=input("enter your user id")
ad4.loc[len(ad4.index)]=[len(ad4.index),qe,a1,"0"]
a4=ad4.drop("Unnamed: 0",axis=1,inplace=True)
print("SUCESSFULLY PAID")
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
elif ri==2:
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
ad4.drop("Unnamed: 0",axis=1,inplace=True)
k=int(input(" user_id .."))
r=len(ad4)
for i in range(r):
qe=ad4.iat[i,2]
qe1=ad4.iat[i,0]
if qe1==k:
a1=ch*aa
a2=a1*qe/100
a3=a1-a2
print("you got discount",qe,"% and save",a2)
print("you have to pay",a3)
print("pay now")
print("2. confirmed")
ai=int(input("enter your choice"))
q=len(ad4)
for i in range(q):
ch=ad4.iat[i,0]
if ch==k:
e=a3
ad4.iat[i,ai-1]=e
print(ad4.iloc[i:i+1,:])
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
if ak==2:
print(" 1.QUANTITY GREATER THAN 1KG")
print(" 2.QUANTITY LESS THAN 1KG")
aq=int(input("enter your choice"))
if aq==1:
aa=float(input("quantuty"))
q=len(ad2)
for i in range(q):
ch=ad2.iat[i,2]
ch1=ad2.iat[i,1]
if ch1==w:
print("1. for new user")
print("2. existing user")
ri=int(input("enter your choice"))
if ri==1:
a1=ch*aa
print("you have to pay",a1)
print("pay now")
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
qe=input("enter your user id")
ad4.loc[len(ad4.index)]=[len(ad4.index),qe,a1,"0"]
a4=ad4.drop("Unnamed: 0",axis=1,inplace=True)
print("SUCESSFULLY PAID")
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
elif ri==2:
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
ad4.drop("Unnamed: 0",axis=1,inplace=True)
k=int(input(" user_id .."))
r=len(ad4)
for i in range(r):
qe=ad4.iat[i,2]
qe1=ad4.iat[i,0]
if qe1==k:
a1=ch*aa
a2=a1*qe/100
a3=a1-a2
print("you got discount",qe,"% and save",a2)
print("you have to pay",a3)
print("pay now")
print("2. confirmed")
ai=int(input("enter your choice"))
q=len(ad4)
for i in range(q):
ch=ad4.iat[i,0]
if ch==k:
e=a3
ad4.iat[i,ai-1]=e
print(ad4.iloc[i:i+1,:])
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
elif aq==2:
aa=float(input("quantuty"))
q=len(ad2)
for i in range(q):
ch=ad2.iat[i,2]
ch1=ad2.iat[i,1]
if ch1==w:
print("1. for new user")
print("2. for existing user")
ri=int(input("enter your choice"))
if ri==2:
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
ad4.drop("Unnamed: 0",axis=1,inplace=True)
k=int(input(" user_id .."))
r=len(ad4)
for i in range(r):
qe=ad4.iat[i,2]
qe1=ad4.iat[i,0]
if qe1==k:
a1=ch*aa/1000
a2=a1*qe/100
a3=a1-a2
print("you got discount",qe,"% and save",a2)
print("you have to pay",a3)
print("pay now")
print("2. confirmed")
ai=int(input("enter your choice"))
q=len(ad4)
for i in range(q):
ch=ad4.iat[i,0]
if ch==k:
e=a3
ad4.iat[i,ai-1]=e
print(ad4.iloc[i:i+1,:])
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
elif ri==1:
a1=ch*aa/1000
print("you have to pay",a1)
print("pay now")
ad4=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
qe=input("enter your user id")
ad4.loc[len(ad4.index)]=[len(ad4.index),qe,a1,"0"]
a4=ad4.drop("Unnamed: 0",axis=1,inplace=True)
print("SUCESSFULLY PAID")
ad4.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
else:
print("invald input")
elif ap==2:
ad2=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
ad2.drop("Unnamed: 0",axis=1,inplace=True)
b=input("enter product details : ")
a=len(ad2)
for i in range(a):
ch=ad2.iat[i,1]
if ch==b:
print(ad2.iloc[i:i+1,:])
elif ap==3:
ad2=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/product.docx")
ad2.drop("Unnamed: 0",axis=1,inplace=True)
print(ad2)
elif ap==4:
print("WELCOME ")
print("press 1 TO CONFORM")
print("press 2 NOT NOT CONFORM")
choice=int(input("enter your choice"))
if choice==2:
print("Thanks for giving vauable Time")
elif choice==1:
print("THANKS FOR YOUR RESPONSE")
print("1) Which country is holding elections after 14 years of drought in politics?")
print("1.Jerusalem")
print("2. Thailand")
print("3. Turkey")
print("4. Palestine")
ob=int(input("enter your answer"))
if ob==1:
print("WRONG ANSWER")
n1=0
print("The correct answer is: Palestine")
elif ob==2:
print("WRONG ANSWER")
n1=0
print("The correct answer is: Palestine")
elif ob==3:
print("WRONG ANSWER")
n1=0
print("The correct answer is: Palestine")
elif ob==4:
print("CORRECT ANSWER")
n1=1
else:
print("invalid option")
n1=0
print("2) WHO IS KNOWN AS THE FATHER OF STATISTICS?")
print("1. ROBERT FROST")
print("2. HOMI J BHABHA")
print("3. Gottfried Achenwall")
print("4. RAMANUJAN")
oc=int(input("enter your answer"))
if oc==1:
print("WRONG ANSWER")
n2=0
print("The correct answer is: Gottfried Achenwall")
elif oc==2:
print("WRONG ANSWER")
n2=0
print("The correct answer is: Gottfried Achenwall")
elif oc==3:
print("CORRECT ANSWER")
n2=1
elif oc==4:
print("WRONG ANSWER")
n2=0
print("The correct answer is: Gottfried Achenwall")
else:
print("invalid option")
n2=0
print("3) Who was Dr James Naismith?")
print("1. The inventor of pressure cooker")
print("2. Inventor of Basketball")
print("3. The inventor of the ball")
print("4. The inventor of the computer")
od=int(input("enter your answer"))
if od==1:
print("WRONG ANSWER")
n3=0
print("The correct answer is: Inventor of Basketball")
elif od==2:
print("CORRECT ANSWER")
n3=1
elif od==3:
print("WRONG ANSWER")
n3=0
print("The correct answer is: Inventor of Basketball")
elif od==4:
print("WRONG ANSWER")
n3=0
print("The correct answer is: Inventor of Basketball")
else:
print("invalid option")
n3=0
print("4) India shares its rank with which country in Henley’s and Partners Passport Index?")
print("1. Pakistan")
print("2. Tajikistan")
print("3. Iran")
print("4. Mauritius")
oe=int(input("enter your answer"))
if oe==1:
print("WRONG ANSWER")
n4=0
print("The correct answer is: Tajikistan")
elif oe==2:
print("CORRECT ANSWER")
n4=1
elif oe==3:
print("WRONG ANSWER")
n4=0
print("The correct answer is: Tajikistan")
elif oe==4:
print("WRONG ANSWER")
n4=0
print("The correct answer is: Tajikistan")
else:
print("invalid option")
n4=0
print("5) Who was Lord Basaveshwara?")
print("1. He is the God of the Parsees")
print("2. He is the God of the home also called Vastu")
print("3.He is a Kannada social reformer ")
print("4. This is the name given to social reformers of the 16th century")
of=int(input("enter your answer"))
if of==1:
print("WRONG ANSWER")
n5=0
print("The correct answer is: He is a Kannada social reformer")
elif of==2:
print("WRONG ANSWER")
n5=0
print("The correct answer is: He is a Kannada social reformer")
elif of==3:
print("CORRECT ANSWER")
n5=1
elif of==4:
print("WRONG ANSWER")
n5=0
print("The correct answer is: He is a Kannada social reformer")
else:
print("invalid option")
n5=0
print("6) WHO IS KNOWN AS THE MISSILE MAN OF INDIA?")
print("1. C V RAMAN")
print("2. HOMI J BHABHA")
print("3. A P J ABDUL KALAM")
print("4. SALIM ALI")
og=int(input("enter your answer"))
if og==1:
print("WRONG ANSWER")
n6=0
print("The correct answer is: A P J ABDUL KALAM")
elif og==2:
print("WRONG ANSWER")
n6=0
print("The correct answer is: A P J ABDUL KALAM")
elif og==3:
print("CORRECT ANSWER")
n6=1
elif og==4:
print("WRONG ANSWER")
n6=0
print("The correct answer is: A P J ABDUL KALAM")
else:
print("invalid option")
n6=0
print("7) Which place has recently reported wildfire in India?")
print("1. Nubra Valley")
print("2.Liddar Valley ")
print("3. Chenab Valley")
print("4. Dzukou Valley")
oh=int(input("enter your answer"))
if oh==1:
print("WRONG ANSWER")
n7=0
print("The correct answer is: Dzukou Valley")
elif oh==2:
print("WRONG ANSWER")
n7=0
print("The correct answer is: Dzukou Valley")
elif oh==3:
print("WRONG ANSWER")
n7=0
print("The correct answer is: Dzukou Valley")
elif oh==4:
print("CORRECT ANSWER")
n7=1
else:
print("invalid option")
n7=0
print("8) Which scheme has been recently launched that would contribute to Urban forests in India?")
print("1. Nagar Van scheme")
print("2. Urban Vegetation scheme 2020")
print("3. Indian Forest Development 2020")
print("4.None of the above ")
oh=int(input("enter your answer"))
if oh==1:
print("CORRECT ANSWER")
n8=1
elif oh==2:
print("WRONG ANSWER")
n8=0
print("The correct answer is: Nagar Van scheme")
elif oh==3:
print("WRONG ANSWER")
n8=0
print("The correct answer is: Nagar Van scheme")
elif oh==4:
print("WRONG ANSWER")
n8=0
print("The correct answer is: Nagar Van scheme")
else:
print("invalid option")
n8=0
print("9) India does not conduct a navy exercise with which of the following? ")
print("1.Bangladesh ")
print("2. Sweden")
print("3. Myanmar")
print("4. USA")
oh=int(input("enter your answer"))
if oh==1:
print("WRONG ANSWER")
n9=0
print("The correct answer is: Sweden")
elif oh==2:
print("CORRECT ANSWER")
n9=1
elif oh==3:
print("WRONG ANSWER")
n9=0
print("The correct answer is: Sweden")
elif oh==4:
print("WRONG ANSWER")
n9=0
print("The correct answer is: Sweden")
else:
print("invalid option")
n9=0
print("10) Which of the Indian maritime projects is implemented to counter China’s presence in the Indian Ocean?")
print("1. Malabar exercise")
print("2. String of pearls")
print("3.Sagarmala project ")
print("4. Mausam")
oh=int(input("enter your answer"))
if oh==1:
print("WRONG ANSWER")
n10=0
print("The correct answer is: Sagarmala project")
elif oh==2:
print("WRONG ANSWER")
n10=0
print("The correct answer is: Sagarmala project")
elif oh==3:
print("CORRECT ANSWER")
n10=1
elif oh==4:
print("WRONG ANSWER")
n10=0
print("The correct answer is: Sagarmala project")
else:
print("invalid option")
n10=0
a1= n1+n2 +n3 +n4 +n5 +n6 +n7 +n8 +n9 +n10
print ("result", a1,"/10")
a2=a1/10*100
print(a2, "%")
ad5=pd.read_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
ad5.drop("Unnamed: 0",axis=1,inplace=True)
print("3. to save discount")
ai=int(input("enter your choice"))
w=int(input("enter user_id : "))
q=len(ad5)
for i in range(q):
ch=ad5.iat[i,0]
if ch==w:
e=a2
ad5.iat[i,ai-1]=e
print(ad5.iloc[i:i+1,:])
ad5.to_csv("/storage/emulated/0/WhatsApp Business/Media/python/discount.docx")
else:
print("INVILD INPUT")
else:
print("Invalid")
else:
print("you are un othorised user")
else:
print("unknown syntex, Try again")
0 Comments