Professional Documents
Culture Documents
PRACTICAL ASSIGNMENT Class 12
PRACTICAL ASSIGNMENT Class 12
Date: 01/04/2023
Q. Write a program in python with the help of a function number_words.
That takes a 2 digit number and returns the equivalent number.
Code:
Output:
PRACTICAL ASSIGNMENT-02
Date: 04/04/2023
Q. Write a program in python using a function rev_string that takes the
string and returns its reverse.
Code:
Output:
PRACTICAL ASSIGNMENT-03
Date: 11/04/2023
Q. Write a program in python using a function initial_name() which takes
the full name as a parameter and returns the initial name.
Code:
Output:
PRACTICAL ASSIGNMENT-04
Date: 18/04/2023
Q. Write a program in python with or without function to mimic a lucky 7
game. Based on the amount bid, a person would be a winner or a loser.
A lucky 7 winner will get thrice the amount of bid, rest will get double.
Code:
Output:
PRACTICAL ASSIGNMENT-07
Date: 02/05/2023
Q. Write a program in python to input text in a file source.txt and display
it in word wise reverse manner.
Code:
Output:
PRACTICAL ASSIGNMENT-08
Date: 09/05/2023
Q. Write a function that takes a file ‘original.txt’ as parameter and returns
another file ‘sorted.txt’ if ‘original.txt’ contains names: ravi, akshat,
ZUBIN, shyam, inder the ‘sorted.txt’ must contains ZUBIN, akshat, inder,
ravi, shyam
Code:
Output:
Output:
PRACTICAL ASSIGNMENT-09
Date: 09/05/2023
Q. Write a function that takes a file ‘first.txt’ and returns a file ‘second.txt’
Code:
Output:
PRACTICAL ASSIGNMENT-10
Date: 18/07/2023
Q. Create a database with your name. Inside database create a table
product.write the commands for following:
3. Display all the columns from both the tables(without repeating empno)
PRACTICAL ASSIGNMENT-13
Date: 25/07/2023
Q. Create a table address and perform the the given tasks(with join)
1. Display the complete data from both the tables.
3. Display all the columns from both the tables(without repeating empno)
PRACTICAL ASSIGNMENT-14
Date: 02/08/2023
Q1. Create a table product (pid, name, price).
2. Alter its creation, set pid as primary key.
4. Create a table stock with column details item int primary key, pname
varchar(10) not null, part_no int unique, category varchar(10) default.
PRACTICAL ASSIGNMENT-15
Date: 02/08/2023
Q1. Create table bank with columns ac_no, cust_name, balance
2. Enter data:
PRACTICAL ASSIGNMENT-16
Date: 08/08/2023
Q1. create a table student with columns roll_no, name, dob, doa and
display all values.
3. Display name and their corresponding day of week for those before
the year of birth 2006.
4.Display name and month name for both dob and doa.
5. Display day of week for dob in 3 letter form.
PRACTICAL ASSIGNMENT-17
Date: 11/08/2023
Q1. Create a table new_harsh with columns sid, sport, nop and display
them