Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
14 views75 pages

Print Ready 1000

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)
14 views75 pages

Print Ready 1000

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/ 75

MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Project Work On
1. MS-ACCESS
2. C-Language
3. JavaScript
4. PHP
5. Power Point

Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111

External Examiner Internal Examiner

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
Acknowledgement
This project was developed as a partial fulfillment of the Grade 12
Computer Science curriculum, as prescribed by the National Examinations
Board (NEB). It encompasses various aspects of several programming and
application tools, including:
• Microsoft Access: Database creation, table design, relationship
establishment, query development, form creation, and report
generation.
• C Programming: User-defined functions, structures, file handling,
and pointers.
• JavaScript: Conditional statements (if, if-else), loops (for, while, do-
while), functions, arrays, and form connectivity.
• PHP: Conditional statements, loops, arrays, database connectivity,
and server-side query execution.
• Microsoft PowerPoint: Animation, hyperlinks, slide duplication,
and shape drawing.

I extend my sincere gratitude to several individuals who provided


invaluable support throughout the project's development. Firstly, I am
deeply thankful to my parents for their unwavering economic support.
Secondly, I express my appreciation to the college management for
providing access to a well-equipped computer laboratory. Thirdly, I am
particularly grateful to my subject teacher, Mr. Kapil Sharma, for his
guidance and assistance. Finally, I would like to acknowledge the support
of my friends, brother, and sister, whose encouragement and help were
instrumental in the project's completion.
Table Of Content

Lab 1: Creating tables and designing Queries


Lab 2: Creating one to many relationship and form with buttons C-
Programming
Lab 3: User Defined Function
Lab 4: Structure
Lab 5: File Handaling
Lab 6: Pointer Java Script
Lab 7: Function and Control Structure PHP
Lab 8: Control Structure and Database Connectivity Presentation
Lab 9: power Point Presentation
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 1
Creating Tables And Designing Queries
(MS-Access).
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
About MS-Access
Microsoft Access is a relational database management system
(RDBMS) developed by Microsoft. It is part of the Microsoft 365
suite and is used for creating, managing, and analyzing databases.

Key Features of MS Access

1. Database Management – Allows users to store, organize, and


retrieve data efficiently.
2. Tables – Stores data in structured rows and columns.
3. Queries – Helps retrieve and manipulate data using SQL or query
design tools.
4. Forms – Provides user-friendly interfaces for data input and
interaction.
5. Reports – Generates formatted summaries and visual presentations
of data.
Table: Student Detail

Table: Exam Detail

Designing the select query to display the records of Male students only

Designing the select query to display the records of Female students only

Designing the select query to display the records of students who scored above 70%

Designing the select query to display the records of students who scored less than 70%
CONCLUSION

From the above practical I came to know how to


create database, create table, store data into
table, design, select and update queries using MS
Access as a database software.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 2
Creating One To Many Relationships and Form With Button
(MS-Access).

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
TABLE: Student Detail

TABLE: Exam Detail

One to Many Relationship

Two Queries
STUDENT FORM

REPORT
Conclusion:
From the above practical I came to know how to
create database table,store data into the table,
create relationship between tables,create form
with buttons and make report of data using MS
Access as a database software.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 3
Structure
C-Programming).

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
C Programming Overview

C is a general-purpose, procedural programming language developed


by Dennis Ritchie at Bell Labs in 1972. It is one of the most widely used
programming languages and serves as the foundation for many modern
languages like C++, Java, and Python.

Key Features of C Language


1. Simple & Efficient – Provides low-level access to memory with high
performance.
2. Structured Programming – Uses functions to break down tasks into
manageable parts.
3. Portable – Can run on various hardware and operating systems with
minimal modifications.
4. Fast Execution – Directly interacts with hardware, making it faster
than high-level languages.
5. Rich Library – Comes with standard libraries for handling I/O,
math, and string operations.
6. Pointer Support – Allows direct memory manipulation, making it
powerful for system programming.
7. Extensible – Can be easily extended with additional libraries and
functions.
8. Procedural Language – Focuses on step-by-step execution with
clear control flow.
WACP to enter information of one student and
display it in an appropriate format on the
screen using structure variable.
Source Code:

#include<stdio.h>
#include<string.h>

struct DOB
{
int year;
int month;
int day;
};

struct student
{
int rollNo;
char name[50];
char address[50];
int classes;
char gender[50];
char email[50];
struct DOB db;
}stu;

int main()
{
printf("\nEnter the detail of one student\n");
printf("\n_________________________________\n");
printf("\nEnter the name of the student\n");
scanf("%s",stu.name);
printf("\nEnter the roll no of student\n");
scanf("%d", &stu.rollNo);
printf("\nEnter the address of student\n");
scanf("%s", stu.address);
while(getchar()!='\n');
printf("\nEnter the classes of student\n");
scanf("%d",&stu.classes);
while(getchar()!='\n');
printf("\nEnter the gender of student\n");
scanf("%s",stu.gender);
while(getchar()!='\n');
printf("\nEnter the email of student\n");
scanf("%s",stu.email);
while(getchar()!='\n');
printf("\nEnter the DOB of one student\n");
printf("\n_________________________________\n");
printf("\nEnter the year\n");
scanf("%d",&stu.db.year);
printf("\nEnter month\n");
scanf("%d",&stu.db.month);
printf("\nEnter day\n");
scanf("%d",&stu.db.day);

printf("\nThe name of the student is %s\n",stu.name);


printf("\nThe roll no of %s is %d\n",stu.name, stu.rollNo);
printf("\nThe address of %s is %s\n",stu.name, stu.address);
printf("\nThe class of %s is %d\n",stu.name, stu.classes);
printf("\nThe email of %s is Rs %s\n",stu.name, stu.email);
printf("\nThe gender of %s is %s\n", stu.name, stu.gender);
printf("\nThe DOB of %s is %d / %d / %d \n",stu.name,
stu.db.day ,stu.db.month,stu.db.year);
return 0;
}
Input/Output
WACP to enter information of 5 student and
display it in an appropriate format on the
screen using structure variable.
Source Code:

#include <stdio.h>
#include <string.h>

int main() {
int rollno[5];
char name[5][60], address[5][60];
FILE *fp;
int i;

fp = fopen("D:\\info.txt", "w");
if (fp == NULL) {
perror("Error opening file for writing");
return 1;
}

for (i = 0; i < 5; i++) {

printf("Enter the information of student %d\n", i + 1);


printf("________________________________\n");
printf("Enter Rollno: ");
scanf("%d", &rollno[i]);
while (getchar() != '\n');
printf("Enter Name: ");
fgets(name[i], sizeof(name[i]), stdin);
name[i][strcspn(name[i], "\n")] = 0;
printf("Enter Address: ");
fgets(address[i], sizeof(address[i]), stdin);
address[i][strcspn(address[i], "\n")] = 0;
fprintf(fp, "%d\n%s\n%s\n", rollno[i], name[i],
address[i]);
printf("________________________________\n");
}
fclose(fp);

fp = fopen("D:\\info.txt", "r");
if (fp == NULL) {
perror("Error opening file for reading");
return 1;
}

for (i = 0; i < 5; i++) {


fscanf(fp, "%d\n", &rollno[i]);
fgets(name[i], sizeof(name[i]), fp);
name[i][strcspn(name[i], "\n")] = 0;
fgets(address[i], sizeof(address[i]), fp);
address[i][strcspn(address[i], "\n")] = 0;
printf("_____________________________\n");
printf("The information of %s is\n", name[i]);
printf("_____________________________\n");
printf("\n Roll No.: %d", rollno[i]);
printf("\n Name: %s", name[i]);
printf("\n Address: %s\n", address[i]);
}

fclose(fp);
return 0;
}
Input/Output
Conclusion:
From the above practical I came to know how to
perform arithmetic operation using function and
switch case, find the factorial of first 10
integer using function and find the factorial of
a given number and calculate the sum of n number
using recursive technique.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 4
File Handling
(C-Programming)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
WACP to enter roll, name and address of one student and
display it on the screen using structure variable.

Source Code:
#include<stdio.h>
#include<string.h>

struct student
{
int ID;
char name[50];
char address[50];
char grade[50];

}emp;

int main()
{
printf("\nEnter the name of the student\n");
scanf("%s", emp.name);
printf("\nEnter the id of %s\n", emp.name);
scanf("%d", &emp.ID);
while(getchar()!='\n');
printf("\nEnter the address of %s\n", emp.name);
scanf("%s", emp.address);
while(getchar()!='\n');
printf("\nEnter the grade of %s\n", emp.name);
scanf("%s", emp.grade);
while(getchar()!='\n');
printf("\nThe name of the student is %s\n", emp.name);
printf("\nThe ID of the %s is %d\n", emp.name, emp. ID);
printf("\nThe address of the %s is %s\n", emp.name,
emp.address);
printf("\nThe grade of the student is %s\n", emp.grade);
return 0;
}
Input/Output
WACP to store the information of 5 books
into. The file name “book.dat” and display
it on the screen after reading from the
file.

Source Code:
#include <stdio.h>
#include <string.h>

int main()

{
int bookid[5], i;
char bookname[5][60];
char authorname[5][60];
char publication[5][60];
int edition[5];
float price[5];
FILE *fp;

fp = fopen("D:\\book.dat", "w");

printf("Enter the information of 5 different books:\n");


printf("________________________________\n");

for (i = 0; i < 5; i++) {


printf("\nEnter Book id[%d]: ", i + 1);
scanf("%d", &bookid[i]);
while (getchar() != '\n');

printf("Enter Book Name[%d]: ", i + 1);


fgets(bookname[i], sizeof(bookname[i]), stdin);
bookname[i][strcspn(
bookname[i], "\n")] = 0;

printf("Enter Author Name[%d]: ", i + 1);


fgets(authorname[i], sizeof(authorname[i]), stdin);
authorname[i][strcspn(authorname[i], "\n")] = 0;

printf("Enter Publication[%d]: ", i + 1);


fgets(publication[i], sizeof(publication[i]), stdin);
publication[i][strcspn(publication[i], "\n")] = 0;

printf("Enter Edition[%d]: ", i + 1);


scanf("%d", &edition[i]);
while (getchar() != '\n');

printf("Enter Price[%d]: ", i + 1);


scanf("%f", &price[i]);
while (getchar() != '\n');

fprintf(fp, "%d\n%s\n%s\n%s\n%d\n%f\n", bookid[i],


bookname[i], authorname[i], publication[i], edition[i], price[i]);
}
fclose(fp);

fp = fopen("D:\\book.dat", "r");
if (fp == NULL) {
perror("Error opening file for reading");
return 1;
}

printf("\nThe information of 5 books are:\n");


printf("_____________________________\n");

for (i = 0; i < 5; i++) {


fscanf(fp, "%d\n", &bookid[i]);
fgets(bookname[i], sizeof(bookname[i]), fp);
bookname[i][strcspn(bookname[i], "\n")] = 0;
fgets(authorname[i], sizeof(authorname[i]), fp);
authorname[i][strcspn(authorname[i], "\n")] = 0;
fgets(publication[i], sizeof(publication[i]), fp);
publication[i][strcspn(publication[i], "\n")] = 0;
fscanf(fp, "%d\n", &edition[i]);
fscanf(fp, "%f\n", &price[i]);

printf("\n bookid :%d", bookid[i]);


printf("\n bookname :%s", bookname[i]);
printf("\n author name :%s", authorname[i]);
printf("\n publication :%s", publication[i]);
printf("\n edition :%d", edition[i]);
printf("\n price :%f", price[i]);
printf("\n_____________________________\n");
}
fclose(fp);
return 0;
}
Input/Output
Conclusion:
From the above practical I came to know how
to enter roll, name, and address of one
student and display it on the screen using
structure variable and store the information
of 5 books into the file name"book.dat" and
display it on the screen after reading from
the file.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 5
User Defined Function
(C-Programming)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
WACP to perform arithematic operation using
function and switch case.
Source Code:

#include<stdio.h>

void sum(void);
void sub(void);
void multi(void);
void div(void);

int main()
{
x:
printf("Arithmetic Operation");
printf("\t\t\n_____________________");
printf("\t\t\n1.) Addition");
printf("\t\t\n2.) Subtraction");
printf("\t\t\n3.) Multiplication");
printf("\t\t\n4.) Division");

int ch;
printf("\nEnter Your Choice:");
scanf("%d",&ch);

switch(ch){
case 1:
sum();
break;
case 2:
sub();
break;
case 3:
multi();
break;
case 4:
div();
break;
default:
printf("Invalid.Re-enter");
goto x;
}
char b;
printf("\nDo you want to continue?.(if yes then press
y)\n");
scanf("%s",&b);
if(b=='Y'||b=='y') {
goto x;
}
return 0;
}

void sum(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int add=m+n;
printf("The sum is %d",add);
}

void sub(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int sub=m-n;
printf("The subtraction is %d",sub);
}

void multi(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
int multi=m*n;
printf("The multiplication is %d",multi);
}

void div(){
int m,n;
printf("Enter first number:");
scanf("%d",&m);
printf("Enter second number:");
scanf("%d",&n);
if(n==0){
printf("Cannot divide by zero.");
} else {
int div=m/n;
printf("The division is %d",div);
}
}
Input/Output
WACP to find the factorial of a first 10
integer number using function.

Source Code:

#include<stdio.h>
void fact(void);
int main(){
fact();
return 0;

}
void fact(){
int i,f=1;
for(i=1;i<=10;i++){
f=f*i;
printf("\n%d",f);
}
}

Input/Output
WACP to find the factorial of a given number
using recursive technique.
Source Code:

#include<stdio.h>
int factorial(int);
int main()
{
int n;
printf("Enter any number:");
scanf("%d",&n);
int k= factorial(n);
printf("The factorial of %d is %d",n,k);
return 0;
}
int factorial(int x){
int l;
if(x<=1)
return(1);
else
l = x*factorial(x-1);
return(l);
}

Input/Output
WACP to calculate the sum of n different
number using recursive technique.
Source Code:

#include<stdio.h>
int sum(int);
int main()
{
int n;
printf("Enter the range:");
scanf("%d",&n);
int k=sum(n);
printf("The sum is %d",k);
return 0;

}
int sum(int x){
int add,i;
if(x<=0)
return(0);
else
add=x+sum(x-1);
return(add);
}

Input/Output
Conclusion:
From the above practical I came to know how to
perform arithmetic operation using function and
switch case, find the factorial of first 10
integer using function and find the factorial of
a given number and calculate the sum of n number
using recursive technique.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 6
Pointer
(C-Programming)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
WACP to display the largest number smong the
three different number using pointer.
Source Code:
#include<stdio.h>
int main()
{
int a,b,c,*ptr1,*ptr2,*ptr3;
printf("Enter first number:");
scanf("%d",&a);
printf("Enter second number:");
scanf("%d",&b);
printf("Enter third number:");
scanf("%d",&c);
ptr1=&a;
ptr2=&b;
ptr3=&c;
if(a>b&&a>c)
printf("%d is the largest number",*ptr1);
else if(b>a&&b>c)
printf("%d is the largest number",*ptr2);
else
printf("%d is the largest number",*ptr3);
return 0;
}

Input/Output
WACP to implement call by value and call by
reference.

Call By Value

Source Code:
#include <stdio.h>

int sum(int);

int main() {
int n;
printf("Enter the value: ");
scanf("%d", &n);
n = sum(n);
printf("The sum is %d\n", n);
return 0;
}

int sum(int x) {
return x + 10;
}

Input/Output
Call By Reference

Source Code:
#include<stdio.h>
void sum(int *);
int main()
{
int n;
printf("Enter the value:");
scanf("%d",&n);
sum(&n);
printf("The sum is %d",n);
return 0;
}
void sum(int *x)
{
*x=*x+10;
}

Input/Output
Conclusion:
From the above practical I came to know how to
display largest number among the three different
number and implement call by value and call by
reference using pointer.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 7
Function And Control Structure
(JavaScript)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
JavaScript (JS) Overview

JavaScript (JS) is a high-level, interpreted programming


language primarily used for making web pages interactive. It is one of
the core technologies of the web, alongside HTML and CSS.

Key Features of JavaScript


1. Client-Side & Server-Side – Runs in web browsers and on servers
(Node.js).
2. Interpreted Language – No need for compilation, executed line by
line.
3. Dynamic Typing – No need to declare variable types explicitly.
4. Prototype-Based & Object-Oriented – Uses prototypes instead of
classical classes.
5. Event-Driven – Executes code in response to user actions (click,
hover, etc.).
6. Asynchronous Support – Uses callbacks, promises, and
async/await for non-blocking execution.
7. Cross-Platform – Runs on any device with a browser.
8. Huge Ecosystem – Supports various libraries and frameworks
like React, Angular, Vue, Node.js.
Write a Javascript program to calculate the
sum of two different number.

Source Code:

function sum() {
let a = prompt("Enter First Number?");
let b = prompt("Enter second number");
let sum = parseInt(a) + parseInt(b);
document.write("The sum is " + " " + sum);
}
sum();

Input/Output
Write a Javascript program to check whether
the number entered by the user is odd or
even.

Source Code:

function oddeven() {
let a = prompt("Enter any Number?");
if (a % 2 == 0) alert(a + " is even number");
else alert(a + " is odd number");
}
oddeven();

Input/Output
Write a Javascript program to calculate the
factorial of a given number using function.

Source Code:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title>Fatorial</title>
</head>
<body>
<script type="text/javascript">
function factorial() {
let n = prompt("Enter any number:");
let i,
fact = 1;
if (n <= 1) alert("The factorial of " + n + " is 1");
else
for (i = 1; i <= n; i++) {
fact = fact * i;
}
alert("The factorial of " + n + " is " + fact);
}
factorial();
</script>
</body>
</html>
Input/Output
Write a Javascript program to display the
largest number among the 10 different
number.

Source Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title></title>
</head>
<body>
<script type="text/javascript">
let i, large;
let array = [];
for (i = 0; i < 10; i++) {
array[i] = parseInt(prompt("Enter number: " + (i + 1)));
}
alert(array + " ");
large = array[0];
for (i = 1; i < 10; i++) {
if (large < array[i]) {
large = array[i];
}
}
alert(large + " is the largest number");
</script>
</body>
</html>
Input/Output
Write a Javascript program to design
Calculator.

Source Code HTML:

.<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-
scale=1" />
<title>Calculator</title>
</head>
<body>
<script src="Artihematic.js"></script>

First Number <br />


<input type="text" id="first" /><br />

Second Number<br />


<input type="text" id="second" /><br />

Result<br />
<input type="text" id="result" /><br />
<input type="submit" value="Add" onclick="sum();" />
<input type="submit" value="Subtract" onclick="subtract();" />
<input type="submit" value="Multiply" onclick="multiply();" />
<input type="submit" value="Divide" onclick="divide();" />
</body>
</html>
Source Code JS:

function sum() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let add = parseInt(a) + parseInt(b);
document.getElementById("result").value = add;
}

function multiply() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let multiply = parseInt(a) * parseInt(b);
document.getElementById("result").value = multiply;
}

function divide() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let divide = parseInt(a) / parseInt(b);
document.getElementById("result").value = divide;
}

function subtract() {
let a = document.getElementById("first").value;
let b = document.getElementById("second").value;
let subtract = parseInt(a) - parseInt(b);
document.getElementById("result").value = subtract;
}
Input/Output
Conclusion:

From the above practical I came to know about


javascript and how to calculate the sum of two
different number, check whether the number
entered by the user is odd or even, calculate the
factorial of a given number using function, to
display the largest number among the 10 different
number using array and design calculator by using
html, javascript and css as a programming
language.
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 8
Control Structure And Database Connectivity
(PHP)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
PHP (Hypertext Preprocessor) Overview

PHP is a server-side scripting language designed for web


development but also used as a general-purpose programming
language. It was created by Rasmus Lerdorf in 1994 and is widely used
for building dynamic websites and web applications.

Key Features of PHP


1. Server-Side Execution – Code runs on the server and sends HTML
to the client.
2. Open-Source & Free – No licensing costs, widely supported by the
community.
3. Cross-Platform – Works on Windows, Linux, macOS, and various
web servers (Apache, Nginx).
4. Embedded in HTML – Can be mixed with HTML for dynamic
content generation.
5. Supports Databases – Works with MySQL, PostgreSQL, SQLite,
etc.
6. Easy to Learn & Use – Simple syntax, especially for beginners.
7. Secure – Provides built-in security features like input validation,
encryption, and session management.
8. Fast & Scalable – Suitable for both small websites and large-scale
applications like Facebook, WordPress, and Laravel projects.
Write a PHP to calculate the sum of two
number.

Source Code:

<?php
$a=(int)readline('Enter First Number');
$b=(int)readline('Enter Second Number');
$sum=$a+$b;
echo"The sum is ".$sum;
?>

Input/Output
Write a PHP to display 1 to 10 using for
loop, while loop and do while loop.

Source Code:

<?php
for ($i = 0; $i <= 10; $i++) {
echo $i . "<br>"; // Output the number, then a line break
}
?>

Input/Output
Source Code:

<?php
$i = 1;
while ($i <= 10)
{
echo $i . "<br>";
$i=$i + 1;// Output the number, then a line break
}
?>

Input/Output
Source Code:

<?php
$i = 1;
do
{
echo $i . "<br>";
$i=$i + 1;// Output the number, then a line break
}
while($i <= 10)
?>

Input/Output
Write a PHP to display the largest number
among ten different number.

Source Code:

<?php
$a = (int) readline('Enter first number: ');
$b = (int) readline('Enter second number: ');
$c = (int) readline('Enter third number: ');

if ($a > $b && $a > $c) {


echo "The largest is {$a}";
} elseif ($b > $a && $b > $c) {
echo "The largest is {$b}";
} else {
echo "The largest is {$c}";
}
?>

Input/Output
WAP to connect database using PHP.

Source Code:

<?php
$host = "localhost";
$user = "root";
$password = "";
$dbname = "student";
$conn = mysqli_connect($host, $user, $password,$dbname) or die();
?>
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

Lab 9
PowerPoint Presentation
(MS - PowerPoint)

Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
MILESTONE INTERNATIONAL SECONDARY SCHOOL

SUBJECT: CS (4282)

PowerPoint Presentation On
“Networking And Communication”
Submitted
In
Soft Copy
Submitted to:
Submitted by:
Name : Samadhi Raj Bajracharya
Registration No : 813250040111
Kapil Sharma
(Computer Instructor)

For the partial fulfillment of the requirement for Grade 12 Computer Science
course design by NEB.

Balkumari, Lalitpur
2024/2025 AD
Microsoft PowerPoint Overview

Microsoft PowerPoint is a presentation software developed


by Microsoft, used for creating slideshows that combine text, images,
animations, videos, and graphics. It is widely used for business
presentations, educational lectures, and personal projects.

Key Features of PowerPoint


1. Slide-Based Presentations – Organizes content into multiple slides.
2. Templates & Themes – Pre-designed layouts for professional
presentations.
3. Text & Formatting Tools – Supports different fonts, colors, and
styles.
4. Multimedia Support – Insert images, audio, videos, and GIFs.
5. Animations & Transitions – Adds movement effects between
slides.
6. Charts & SmartArt – Visual representation of data.
7. Collaboration – Multiple users can edit together using OneDrive.
8. Slide Show Mode – Present slides with full-screen effects.
9. Notes & Comments – Add speaker notes and feedback for better
presentations.
10. Export & Sharing Options – Save as PDF, video, or share
online.

You might also like