0% found this document useful (0 votes)
4 views

computer

Computer class 12 practical

Uploaded by

ikea.gorakhpur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

computer

Computer class 12 practical

Uploaded by

ikea.gorakhpur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Q1- Write a program to take input for a number, calculate square

root and cube root of it

INPUT

OUTPUT
Q2- Write a program to take input of 3 numbers and find the greatest
and smallest number between them.

INPUT

OUTPUT
Q3-Write a program to take input of 2 numbers and an
operator (+, -, *, /). Based on the operator calculate and print
the result.
INPUT

OUTPUT
Q4 - Write a program to create a function Si () which takes
input of P, R, T and calculate Simple Interest.
INPUT

OUTPUT
Q5- Write a program to take an input of year and check given
year is leap year or not.
INPUT

OUTPUT
Q6-Write a program to take input of any number and print its
table.
INPUT

OUTPUT
Q7-Write a program to take input of any number and check it
is a perfect number or not?
INPUT

OUTPUT
Q8-Write a program to take input of any number and check it
is a prime number or not?
INPUT

OUTPUT
Q9-Write a program to take input of any number and print its
factorial value.
INPUT

OUTPUT
Q10-Write a program to take input of any number and check
if the entered number is Armstrong or not.
INPUT

OUTPUT
Q11-Write a program to print following pattern:
*
* *
* * *
INPUT

OUTPUT
Q12-Write a program to enter the number of terms and to
print the Fibonacci Series.
INPUT

OUTPUT
Q13-Write a program to remove all the odd numbers form the
given list.
INPUT

OUTPUT
Q14-Write a program that counts the number of alphabets
and digits, uppercase, lowercase, space, and other
characters in string entered.
INPUT

OUTPUT
Q15-Write a program to maintain book details like book
code, book title and book price using stacks data structure.
(implement push (), pop (), and traverse () function)
INPUT

OUTPUT
Q16- Write a program to read a file named “data.txt”, count
and print total alphabets in the file.
INPUT

OUTPUT

TEXT FILE
Q17-Write a program to copy the entire content from file
“data.txt” to “story.txt”
INPUT

OUTPUT

Story.txt
Q18- Write a program to display the longest word form file
“data.txt”
INPUT

OUTPUT
Q19- Write a program to read a file named “data.txt”, count
and print the following
i) Length of the file.
ii) Total upper-case alphabets.
iii) Total digits.
iv) Total lower-case alphabets.
INPUT

OUTPUT
Q20-Write a program to insert a record in table using python
and MySQL interface.
INPUT

OUTPUT

MySQL
Create Database

Use Database

Display Structure of Table

Show Tables Present in the Database

Insert Data in Table

Display All Content of Table


Display Selected Content of Table Using DISTINCT Keyword

Using WHERE Clause

Create Table

Using ORDER BY Clause

Using UPDATE Command

Using ALTER Command


Using LIKE Operator

Using Aggregate Functions

Using GROUP BY Command

Using HAVING Clause

Using GROUP BY with ORDER BY

Using GROUP BY and HAVING Clause with WHERE Clause


Using JOIN Command

Accessing Data from Two Tables

Using GROUP BY Clause in JOIN

Adding Primary Key

Using DELETE Command

Using DROP Command

You might also like