Cs File Bhavya
Cs File Bhavya
Output:-
PRACTICAL 2
AIM:Write a Python program to find the factorial of a number
using default parameters. (Include proper error condition for a
negative number as input.)
Input:-
Output:-
PRACTICAL 3
AIM:Write a program to demonstrate the concept of the scope of a
variable.
Input:-
Output:-
PRACTICAL 4
AIM:Write a program to create a function menu() which passes List as an
argument and displays the following menu and does the operation accordingly.
1. Count and print ARMSTRONG numbers.
2. Count and print Prime Numbers
3. Exit
Input:-
Output:-
PRACTICAL 5
AIM: Write a function insert(L,num,pos) that accepts a list,a number and a
position where number is to be added and then add the number in the list.Use
try and except to check that position is valid otherwise display error message.
Input:-
Output:-
PRACTICAL 6
AIM: Read a text file line by line and display each word separated
by a #
Input:-
Output:-
PRACTICAL 7
AIM: Read a text file and display the no. of
vowels/consonants/uppercase/lowercase characters in file?
Input:-
Output:-
PRACTICAL 8
AIM: Remove all the lines that contains the character ‘a’ in a file
and write it to another file
Input:-
OUTPUT
PRACTICAL 9
AIM: Create a binary file with name and roll number.Search for
given roll number and display the name, if not found display
appropriate message.
Input:-
Output:-
PRACTICAL 10
AIM; Create a binary file with roll no. name and marks.Input a roll
no. and update the marks
Input:-
-
PRACTICAL 11
Output:-
PRACTICAL 12
Output:-
PRACTICAL 13
AIM: Create a CSV file by entering user id and password, read and
search the password for given userid
Input:-
Output:-
PRACTICAL 14
(ii)
(iii)
(iv)
(v)
(vi)
(vii)
(viii)
PRACTICAL 15
AIM: Write SQL commands for the statements (i) to (iv) and
give outputs for SQL queries (v) to (vii)
OUTPUT:
(i)
(ii)
(iii)
(iv)
(v)
(vi)
(vii)
PRACTICAL 16
(iii)
PRACTICAL 17
(ii)
(iii)
PRACTICAL 18
AIM: Write SQL commands for the following on the basis of
given table STUDENT
(iii)
PRACTICAL 19
AIM: Write a Python program that displays first three rows
fetched from student table of MySQL database "test".
SOURCE CODE:
OUTPUT:
PRACTICAL 20
AIM: Write a Python database connectivity script that deletes
records from category table of database items that have
name='Stockable’
SOURCE CODE:
OUTPUT:
PRACTICAL 21
• Username – root
• Password – tiger
• Host – localhost
The values of fields Rno, name, fee and DOB has to be accepted from the user.
Help Kabir to write the program in python
SOURCE CODE:
OUTPUT: