Jomo Kenyatta University of Agriculture & Technology
Dept. of Electrical, Electronic & Information Engineering | ICS 2371
Week 3 | 2 Hours | 25 Marks Total
This lab covers PHP control structures: if, if-else, if-elseif-else, nested conditionals, switch-case, the ternary operator, and the PHP 8 match expression.
Full lab instructions, task descriptions, and submission steps are available in the iLMS Assignment tab as an interactive HTML guide.
lab3-control-structures/
├── starter/
│ ├── lab3_task1.php ← Task 1 skeleton (warm-up exercises)
│ ├── lab3_task2.php ← Task 2 skeleton (grade classification)
│ ├── lab3_task3.php ← Task 3 skeleton (switch-case)
│ └── lab3_task4.php ← Task 4 skeleton (nested conditions)
├── .github/
│ ├── workflows/
│ │ └── check-submission.yml ← automated checks run on your PR
│ └── PULL_REQUEST_TEMPLATE.md ← fill this in when submitting
└── RUBRIC.md ← marks breakdown
This repo submission contributes 10 marks toward your lab total of 25.
The remaining 15 marks come from your PDF report submitted on iLMS.
Click Fork (top-right of this page). This creates your own copy under your GitHub account.
git clone https://github.com/YOUR_USERNAME/lab3-control-structures.git
cd lab3-control-structuresCopy the starter files to the root (or work directly inside starter/). Complete each task file. Do not rename the files.
Use this commit message format (replace with your actual reg number):
git add .
git commit -m "feat: lab3 complete - SCT212-XXXX/2024"
git push origin mainGo to your fork on GitHub → click Contribute → Open Pull Request back to the original repo.
Fill in the Pull Request template that appears. Include your iLMS report submission link.
Automated checks will run immediately. You will see a green tick or red cross within ~60 seconds. Fix any errors before the deadline.
| Submission | Platform | Deadline |
|---|---|---|
| GitHub Pull Request | This repo | 48 hours after lab session |
| PDF Lab Report | iLMS Assignment tab | 48 hours after lab session |
Both submissions are required. A missing GitHub PR means 0 for the repo track (10 marks).
Raise a GitHub Issue on this repo using the Question template, or reach out via the iLMS discussion board.