Rps Sr. Sec. School Computer Science: Practical File
Rps Sr. Sec. School Computer Science: Practical File
SCHOOL
COMPUTER SCIENCE
PRACTICAL FILE
1.
Write a program to print a string “hello, world!”.
INPUT:
OUTPUT:
OR
You can directly print a string by the following method:
2.
Write a program in python to check whether a number is
even or odd.
INPUT:
OUTPUT:
3.
Write a python program to check number is prime or not
prime.
INPUT:
OUTPUT:
4.
Write a python program to calculate area of circle.
INPUT:
OUTPUT:
5.
Write a program in python to add two numbers.
INPUT:
OUTPUT:
6.
Write a program in python to specify comments in python.
INPUT:
OUTPUT:
7.
Write a program in python to find greater number among
two numbers.
INPUT:
OUTPUT:
8.
Write a program in python to find greatest among three
numbers.
INPUT:
OUTPUT:
9.
Write a python script to swap the numbers.
INPUT:
OUTPUT:
10.
Write a python program to print numbers from 1 to 6.
INPUT:
OUTPUT:
11.
Write a python script to perform all mathematical
operations by simple calculation.
INPUT:
OUTPUT:
12.
Write a python script to take input for a number calculate
and print its square and cube.
INPUT:
OUTPUT:
13.
Write a python script to take input for two numbers
calculate and print their sum, product and difference.
INPUT:
OUTPUT:
14.
Write a python script to take input for name and age of a
person check and print whether the person can vote or not.
INPUT:
OUTPUT:
15.
Write a python script to take input for a number and print
its table.
INPUT:
OUTPUT:
16.
Write a python script to take input for a number and print
its factorial.
INPUT:
OUTPUT:
17.
Write a python script to take input for a number, check if
the entered number is Armstrong or not.
INPUT:
OUTPUT:
18.
Write a python script to generate values from 1 to 10 and
then remove all the odd numbers from the list.
INPUT:
OUTPUT:
19.
Write a program from python to accept values from the
user, add a tuple to it and display its elements one by one
and also display its minimum and maximum values python.
INPUT:
OUTPUT:
20.
Write a python program to insert an element at a specified
position into a given list.
INPUT:
OUTPUT:
21.
Write a program to show push and pop operation using
stack in python.
INPUT:
OUTPUT:
22.
Write a program to display the size of a file named
“poem.txt” in bytes.
INPUT:
23.
INPUT:
24.
Write a program to display all the lines in the file named
“poem.txt” along with line number.
INPUT:
25.
Write a program to display all the words in the file named
“poem.txt”.
INPUT:
26.
Write a program to display the number of words
in the file named “poem.txt”.
INPUT:
27.
Write a program to display all the words containing “a”,in
the file named “poem.txt”.
INPUT:
28.
Write a program to display the number of
words containing “a”, in the file named
“poem.txt”.
INPUT:
29.
Write a program to count the words “to” and “the”
present in a text file “poem.txt”.
INPUT:
30.
Write a program to count the number of upper-case
alphabets present in a text file “poem.txt”.
INPUT:
31.
Write a program to copy “poem.txt” to “article.txt”.
INPUT:
32.
Write a program to show MYSQL database connectivity in
python.
33.
Write a program in python using SQL to insert records in the
table.
34.
Write a program in python to fetch records of the table by
using SQL select statement.