

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


PAF- KARACHI INSTITUTE OF ECONOMICS & TECHNOLOGY College Of Engineering
(Electrical/Mechatronics/Avionics)
INTRODUCTION TO COMPUTER PROGRAMMING
Lab Objective: Logic Building: Programming from Scratch Language (CLO_1)
Class ID: _____________________ Lab Date: _____________________
Student’s ID: __________________
Marks Obtained:
Lab Task Home Task Total Marks
Graded by Engineer: _____________________________ Date: ____________________
Remarks: ___________________________________________________________________________
Objective:
To make students familiar with coding from scratch, how it is done, and in process learn some basic logic building blocks.
In this lab we will be covering the following online hour of coding exercise:
https://studio.code.org/hoc/
Story:
As shown in above figures, there is a bird and a green piggy from destroying the crops. The job of bird is to reach the piggy and stop it to complete level.
Example 1:
Step 1: Initially workspace (figure-2) is empty and you have to decide and then drag the suitable moves from (left side) blocks pan to workspace.
Step 2: Then join all blocks after (below) the “when run” block in correct order (figure-3) and hit run button (shown in figure-1).
Example 2:
Three new types of blocks are given:
Turn right, Turn left and Repeat untill
Figure - 1
Figure - 2 Figure^ -^3