Class 12 CS Practical Set B Answer Key (23-24)
Class 12 CS Practical Set B Answer Key (23-24)
fo=open(“old.txt”,”r”)
fn=open(“new.txt”,”w”)
lines=fo.readlines()
line=” “
for line in lines:
if ‘a’ not in line:
fo.write(line)
else:
fn.write(line)
fo.close()
fn.close()
print(“Data updated successfully”)
TABLE: CUSTOMER
(i) To display details of all transactions ot TYPE Credit from table TRANSACTION.
(ii) To display the last date of transaction (DOT) from the table TRANSACTION for the customer
(iii) To display the Transaction number, Amount and Date of transactions of all transactions in
Query: Select TRNO, AMOUNT, DOT from TRANSACTION order by Amount Desc;
(iv) To display customer names and corresponding amounts for all customers.
TRANSACTION.CNO;