Champ Harsh
Champ Harsh
Q6) Display the details of all the loans with less than 40
installment.
Q7) Display the accno and loan amount of all the loans
started before 01-04-2009
Q8) Display the Int_rate of all the loans started after 01-04-
2009.
Q9) Display the details of the loans whose rate of interest is
null.
Q30) Put the intrest rate 11.5% for all the loans for
which intrest rate is null.
Q31) Increase intrest rate by 0.5% for all the loans for
which the loan amount is more the 400000.
11)selectavg(price),sum(price),count(*) fromhomework
group by company;
12)select count(*),sum(price) from homework group
by company having company=”sony”;
13)select now(),curdate(),sysdate();
15)selectdayofyear(“2024/04/20”),
dayname(“2024/04/20”) ,dayofweek(“2024/04/20”);
ASSIGNMENT 3
Q) Consider the following table named GYM with
details about fitness products being sold in the store.
Ans)
b) Display the names of all the products with unit
price less than Rs.20000.
Ans)
c) Display the details of all the products with
unitprice in range 20000 to 30000.
Ans)
d) Display the names of all the products by the
manufacturer “avon fitness” in descending order
of unit price.
Ans)
e) Change the unit price data of all the rows by
applying a 10% increased on all the products.
Ans)
f) Remove all the products rows manufactured by
avon fitness.
Ans)
g) Display the details of all the products with
manufacturer name starting with A.
Ans)
PYTHON QUESTIONS
1)Write a program to create a listA a containg positive and
negative from the console.Also create two separate list called
PosNum and NegNum to store positive and negative numbers
respectively.Also, Calculate and print the total of all positive
and negative numbers
2)Write a program to shift the first element to the last
position.
Q3. Given an array named AList with the following elements
[2, 3, 4, -5, 6, -8, 11, -9]
Write a python program to shift the negative to left and the
positive numbers to right so that the resultant list will look like :
[-5, -8, -9, 2, 3, 4, 6, 11]
Q4. Write a menu driven program to perform the
following operations on a list/array.
Q5)WRITE A PROGRAM TO CALCULATE SIMPLE
INTEREST WITH AND WITHOUT USING FUNCTION.
WITHOUT FUNCTION:
WITH FUNCTION:
Q6) WRITE A MENU DRIVEN PROGRAM TO CREATE
PATTERN
OUTPUT:
DATA FILE HANDLING
Q)WRITE A FUNCTION TO COUNT ME/MY IN PYTHON PRESENT IN A FILE.