Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

School of Science and Engineering

Department of Computer Engineering and Computer Science

Program Name: Bachelor of Computer Engineering / Bachelor of Computer Science


Subject Name: Server side Programming lab
Subject Code: ECB 4241 / SCB 2154
Lab Task Date: 27/04/2022

Lab Task 2
Topic: PHP functions and control structures

CO PO
CO 1: Write programs using server side scripting syntax PO 1 : [WA 1]Engineering Knowledge – Apply knowledge of
covering input/output statements, control structures mathematics, natural science, engineering fundamentals and an
and functions etc engineering specialization as specified in WK1 to WK4 respectively to
the solution of complex engineering problems [WK 3]
CO 4: Execute the dynamic web applications using PO 10:[WA 5]Modern Tool Usage – Create, select and apply
modern tools appropriate techniques, resources, and modern engineering and IT
tools, including prediction and modelling, to complex engineering
problems, with an understanding of the limitations [WK 6]

Student Details
Student Id:
Student Name:
Submitted Date:

Lab Rubric Mark

0 2 2.5 Criteria
>3 days < 3 day Same day Completion of task and
submission

Not able to write functions or Understood the concept Able to successfully Execution of the PHP
loops using php but difficulty in implement functions and functions and loops
implementing using php loops using php
Incorrect output Output partially address Output addresses all output
the functionalities functionality
Not neat at all Average Very Neat Neatness and readability
of the Lab report
Total :

Lecturer :
Date :

1
Instructions:

• Practical sheets will be sent to the students after the theory coverage in the class.

• Before coming to the lab, students are expected to read, understand, and practise the theory covered.

• All the lab reports must be handwritten.

Q.1 Using 2 sets of nested for loops, write a PHP program that displays the below pattern

Q.2 Write a PHP program to construct the following pattern, using nested ‘for’ loop

Q.3Q.3

Write a PHP program which will give you all of the potential combinations of a two-digit decimal combination, printed
in a comma delimited format [using while loop]

2
Q.4Q.4

Write a PHP program which uses nested for loop to print a checkerboard as given below

Q.5Q.5

Write a PHP program which has a function to print the power of ANY NUMBER [any base] in a table format using do-
while loop as shown below. [Sample output below is for base 2]

You might also like