pc squared Logo pc squared banner
pc squared

 

Preliminary Software Design and Development
Php Coding Excercies

You need to create the required php code for each of the problems provided.

Activity Worksheet What to do Hints and solutions
Coding excerise 1

Coding Worksheet 1
Generate a print out of Fibonacci numbers

You have been given a problem definition, test data, algorithm and screen design.

You need to create and test the php program code for this problem.

The following is a sample solution of the function (it is NOT complete). There may be other ways to solve the problem Coding 1 Solution

Coding excerise 2

Coding Worksheet 2
Counting the number of letters in a text file

Sample data file sentence.txt - Download data file

You have been given a problem definition, test data, algorithm and screen design.

You need to create and test the php program code for this problem.

Hints: If required there are some hints for the php code.
coding 2 - hints

Solutions: The following is a sample solution. There may be other ways to solve the problem Coding 2 Solution

Coding excerise 3

Coding Worksheet 3
Work out when the Bugs will come out

You have been given a problem definition and test data.

You need to design an algorithm that solves the problem then create and test the php program code.

Hints: If required there are some hints for the php code.
coding 3 - hints

Solutions:The following is a sample solution. There are ways which may be more efficient. Coding 3 Solution

Coding excerise 4

Coding Worksheet 4
Generate pattern of the letter Z

You have been given a problem definition and test data.

You need to design an algorithm that solves the problem then create and test the php program code.

Solutions:The following is a sample solution. There are ways which may be more efficient. Coding 4 Solution
Coding excerise 5

Coding Worksheet 5
Create a graphical report for a set of data

Sample data file carcount1..txt - Download data file

You have been given a problem definition, test data, algorithm and screen design.

You need to create and test the php program code for this problem.