0% found this document useful (0 votes)
37 views2 pages

IT Practical Solutions 2024-25

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

IT Practical Solutions 2024-25

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

Solutions to Practical IT Exam 2024-25

Q1: MySQL Queries


1. Create the table `Student` in the `School` database:

CREATE DATABASE School;


USE School;

CREATE TABLE Student (


ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(50),
Class VARCHAR(10),
Percentage DECIMAL(5, 2),
Fees INT
);

2. Insert values into the `Student` table:

INSERT INTO Student (Name, Class, Percentage, Fees) VALUES


('Amit', 'X', 85.50, 2500),
('Pushkar', 'X', 92.30, 2800),
('Neha', 'XII', 75.00, 3200);

3. Display records of students in class X:

SELECT * FROM Student WHERE Class = 'X';

4. Display records of students paying fees less than 3000:

SELECT * FROM Student WHERE Fees < 3000;

5. Display Class and Percentage of Pushkar:

SELECT Class, Percentage FROM Student WHERE Name = 'Pushkar';


6. Delete the record of Amit:

DELETE FROM Student WHERE Name = 'Amit';

7. Display the structure of the `Student` table:

DESCRIBE Student;

Q2: Java Program


Write a program in Java to get the age from the user and display the age after 10 years:

import java.util.Scanner;

public class AgeAfterTenYears {


public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

System.out.print("Enter your age: ");


int currentAge = scanner.nextInt();

int ageAfterTenYears = currentAge + 10;


System.out.println("Your age after 10 years will be: " + ageAfterTenYears);
}
}

Q3 to Q5
Practical Record (10 marks): Ensure the practical copy includes all required exercises.

Viva (5 marks): Prepare for viva questions based on the syllabus.

Project Work (5 marks): Ensure the project is complete and well-documented.

You might also like