EGCP1130PythonExperiment 1 - Semester-1 - AY 2023-2024 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Department Stamp

For Educational Purposes Only

Sultanate of Oman

Computer Programming for Engineering


(EGCP1130/EECP1290)
Semester 1 Academic Year 2023-2024
Laboratory Manual
ENGINEERING DEPARTMENT
Student Name ID #
Section # Day/Time
Laboratory Technician: Office Hours:

Last
E-mail Address: Version No. 1.3 Date of Septembe
Revisio r 13, 2023
n
Course Coordinator Mr. Falah Jawad Septembe
Signature Date
(Lecturer): r 13, 2023
Chief Technician: Mr. Bernardo Gumapac
Septembe
Signature Date
r 13, 2023
Approved by: Specialization Computer Engineering
13/9/202
Program Coordinator: Ms. Ann Mary Varghese Signature Date
3
Verified by: Section  CAE  EEE  MIE
Curriculum Committee Mr. Mohammed
Signature Date
Member: Fasiuddin
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130
Course Description

EGCP1130 Computer programming for Engineering 3 Credit Hours

Prerequisites: Nil

Goal The course aims to equip the graduates with problem solving, programming skills
and to apply real time programming approaches in all engineering disciplines
through any latest computer programming languages like python.

Objectives Outcomes

The course learning objectives are to enable the On completion of the course the student will be able
students to: to:
1. Develop knowledge of problem solving through 1. Analyze and solve various engineering problems
algorithms and flowcharts. through algorithms and flowcharts.
2. Categorize the levels of programming languages. 2. Classify the types of computer languages; High
level language to Low level language.
3. Explain the basic constructs of Python programming
language. 3. Explain the basic concepts and application of
Python programming in various engineering
4. Develop and write simple Python programs.
fields.
5. Apply Python programming skills in any real time
4. Apply the procedural statements, assignments,
engineering problems.
conditional statements, loops, function calls and
sequences.
5. Develop programs with array and string
operations.
6. Apply file handling operations to read and write
data into the files of different types.
7. Apply and write program to solve any real time
engineering problem.

After successfully completing this course, students should be able to manifest the following ticked College
Graduate Attributes (GAs):
 Discipline knowledge and skills
 Technical and digital competency
 Creativity and Innovation
 Critical Thinking, Analysis, and Problem Solving
 Communication skills
 Teamwork and Leadership
 Entrepreneurial skills
 Lifelong learning
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

DEPARTMENT OF ENGINEERING
ELECTRICAL AND ELECTRONICS ENGINEERING SECTION
Higher College of Technology, P O BOX 74, AL-KHUWAIR, CODE 133  24473600 fax 24485364

Computer Programming for Engineering (ENGR1130)


List of Experiments
S/N Experiment Pag Objecti LO GA No of Mar Technicia
Title e ves No. No. meeting ks n’s
No. No. s Signature
Introduction to Computer 1, 2 1,2 1,2,3,4,5
1 Programming Languages / ,6,7,8 1 week
Algorithms and Flowcharts
Basic Concepts of Python 3, 4 3 1,2,3,4,5
Computer Programming ,6,7,8 2 Weeks
2 Language.
1, 2, 3, 3, 4, 7 1,2,3,4,5 1 Week
3 Operators in Python.
4, 5 ,6,7,8
Conditional Statements in 1, 2, 3, 4, 7 1,2,3,4,5 2 Weeks
4
Python. 4, 5 ,6,7,8
Python Data Structures 1, 2, 3, 4, 7 1,2,3,4,5 2 Week

5
(Lists, Tuples, Sets and 4, 5 ,6,7,8
Dictionaries).
Arrays and Strings in 1, 2, 3, 5 ,7 1,2,3,4,5 1 Week
6 Python. 4, 5 ,6,7,8
7 1, 2, 3, 4, 7 1,2,3,4,5 1 Week
while Loop in Python.
4, 5 ,6,7,8
8 for Loop and range() 1, 2, 3, 4, 7 1,2,3,4,5 1 Week
function in Python 4, 5 ,6,7,8
9 Functions. 1, 2, 3, 5, 7 1,2,3,4,5 1 Week
4, 5 ,6,7,8
1, 2, 3, 6 ,7 1 Week
10 Files.
4, 5
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

LABORATORY/WORKSHOP SAFETY RULES

1. Attentively LISTEN TO THE INSTRUCTIONS of the laboratory/workshop staff before starting with
any laboratory/workshop work.
2. LISTEN TO the laboratory/workshop staff as he discusses the SAFETY ARRANGEMENT for the
activity and keep in mind the required precaution and KNOW THE HAZARDS involved in the
performance of the laboratory/workshop activity.
3. READ AND UNDERSTAND THE PROCEDURE as written in the laboratory/workshop manual
before beginning with any activity. If you have doubts do not hesitate to ask the in-charge
laboratory/workshop staff.
4. Always think of safety. EXECUTE THE LABORATORY EXPERIMENT WITH EXTRA CARE
AND AVOID PLAYING WHILE DOING THE ACTIVITY. Fooling around or "horse play" in the
laboratory/workshop is absolutely forbidden. Students found in violation of this safety rule will be dealt
accordingly.
5. NEVER energize circuits or turn on equipment and devices without approval of the in-charge
laboratory/workshop staff.
6. Do not use devices and equipment if you DO NOT KNOW how to use it. Ask for HELP!
7. OBSERVE BEST PRACTICES for MANUAL HANDLING when working. Do not try to move heavy
objects alone or without the use of the appropriate equipment. Use trolley and/or lifting tools as
necessary. ASK FOR HELP!
8. HOUSEKEEPING RULE is fully implemented in all laboratories and workshops. Keep your work area
clean and organized. Return all devices and equipment in their proper storage.
9. WEAR THE APPROPRIATE ATTIRE while inside the laboratory or workshop (LABORATORY
COAT OR COVER ALL)
10. FOOD AND DRINKS are not allowed inside the laboratory or workshop.
11. FAMILIARIZE yourself with all safety arrangement in the laboratory/workshop. Know the emergency
procedures, evacuation procedures, location of first aid kit and location of the fire extinguisher.
12. If an INCIDENT/ACCIDENT happened, immediately call the attention of the laboratory
instructor/laboratory technician in charge.

COVID 19 SAFETY (Prevent the SPREAD)


13.ALWAYS clean your hands using soap and water or alcohol-based hand sanitizer.
14.MAINTAIN the prescribed two meters (2 meters) social distance
15.ALWAYS wear mask and face shield/goggles
16.DO NOT touch your eyes, nose or mouth
17.COVER your nose and mouth with your bent elbow or a tissue when you cough or sneeze
18.If you feel UNWELL, stay home and inform your advisor right away.
19.SEEK medical attention if you have fever, cough or difficulty breathing
EMERGENCY CONTACT INFORMATION
EMERGENCY SERVICES COLLEGE EMERGENCY NUMBERS
S.N. OFFICE CONTACT NO. S.N. OFFICE ROOM NO.
1 Royal Oman 9999 Colleg Main Campus 24473866/ext.
Police e Clinic 5266
ELC 24473754/ ext.
5154
2 Civil Defense 24343666 College Emergency 92920203
Control Room Hotline
3 Al-Khuwair 24480567 College RHS 5053
Health Center
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

4 Royal Hospital 24599000 Engineering RHS 6102

DEPARTMENT OF ENGINEERING
ELECTRICAL AND ELECTRONICS ENGINEERING SECTION
Higher College of Technology, P O BOX 74, AL-KHUWAIR, CODE 133  24473600 fax 24485364

Course Name: Computer Programming for Engineering


Course Code: EGCP1130/EECP1290

Experiment 1.
Introduction to Computer Programming / Flowcharting and
Algorithm

Obtained Mark

Student Name ID #
Section # Day/Time
Name of Faculty Email
Nabil Al Toubi
(Laboratory): Address:
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

I. INTRODUCTION:

Flowchart represents information or processes as boxes, lines, and text. The boxes represent
activities, the lines (or flowlines) represent the workflow that connects them, and the text
represents what happens at each activity. A flowchart can be drawn by hand on paper or
projected on a whiteboard. A flowchart consists of a set of interconnected shapes which signify
process steps, decision points (if-then branches), or headings.

In this activity, we will use Microsoft Word to draw the flowcharts on this experiment sheet using the
shapes option in the insert top menu. See below for reference.

When to Use a Flowchart?

Flowchart is a very simple yet powerful tool to improve productivity in both our personal and
work life. Here are some ways flowchart can be helpful:
 Document a process.
 Present solution to a problem.
 Brainstorm ideas in a meeting.
 Design an operating system.
 Explain a decision-making process.
 Store information.
 Draw an organizational chart.
 Create a visual user journey.
 Create a sitemap.
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

II. AIMS:

1. Introduce basic flowcharting and algorithms.


2. Formulation of Algorithm and create a Flowchart related to simple logic flow and two-
way branch.
3. Apply and understand the fundamentals of flowcharting and algorithm

III. RISK AND SAFETY WARNING:

Always bear in mind the LABORATORY / WORKSHOP SAFETY RULES (on page 5) especially item
numbers 1, 2, 3, 4, 8, 10, 11, and 12.

IV. TOOLS / EQUIPMENT:

SN Quantity Description Range / Specification


1 1 Computer Workstation with Microsoft Office
Internet and e-learning
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

V. PROCEDURES / RESULTS / SKILLS TESTING

Skills Testing:

Task 1 (Instructor Led) : Create an algorithm and draw a flowchart that will accept 3 numbers and then
display the sum and average, and finally decide if the sum is even or odd
(3 Marks)

1.1 Algorithm (1 Mark)

1.2 Flowchart (2 Marks)


Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

Task 2: Create an algorithm and draw a flowchart that will calculate the given processes - (3 marks)

U=T+A+S
B= U * Y
Z=B+4

1.1 Algorithm (1 Mark)

1.2 Flowchart (2 Marks)


Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

Task 3: (Simple Logic Flow with a two-way branch) - (3 marks)

Write and algorithm and draw a flowchart that will accept 3 numbers and display the largest number.

3.1 Algorithm (1 Mark)

3.2 Flowchart (2 Marks)


Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

VI. End of Activity Assessment


Answer the following questions with brief 1 sentence answers for each question: 3 marks

1. Why are flowcharts and algorithms built?

2. What’s the main difference between and algorithm and a flowchart?

3. Is it necessary for a flowchart to have a stop symbol? What are the


implications if it doesn’t?
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

REFERENCES

Sources (e.g. APA style, MLA style, Harvard referencing, The Chicago Manual of Style)

Ceder, N. (2018). The quick Python book. Simon and Schuster


Text Books

Gowrishankar, S., & Veena, A. (2018). Introduction to python


Reference programming. CRC Press..
Books

Fabrizio Romano. (2018). Learn Python Programming.


https://www.programiz.com/python-programming

Python Tutorial. (n.d.). Retrieved September 13, 2022, from


https://www.w3schools.com/python/
Relevant Web
Sites
Welcome to Python.org. (n.d.). Retrieved September 13, 2022, from
https://www.python.org/
Experiment # 1 – Introduction to C Programming / Flowcharting and Diploma First Year
Algorithm EGCP1130

Laboratory Marking Scheme (30 Marks)

Scoring Rubric for Computer Engineering Laboratory Experiments Version 3.3

Indicators and Degrees of Excellence


SN Behavior / Skill (Marking Criteria)
A B C D
Promptness (1 mark)
Late for 5 to 15 minutes Late for 16 to 30 minutes Absent (0 point)
a. Punctuality (0.5 mark) On time (0.5 mark)
(0.44 mark) (0.34 mark)
1 b. Submission on time (0.5 mark)
Notes:
(1) A student is allowed only 1 working day after the submission deadline to submit his / her experiment sheet. Thereafter, the student will be given zero mark for the full experiment.
(2) The maximum timeline for any given experiment is four working days.

Skill Testing / Experimentation (12 marks) Excellent (88-100%) Very Good (68-87 %) Fair (34-67 %) Poor (0-33 %)
(answers to the questions; flowcharts or diagrams; All task requirements were Most of the task requirements Some of the task requirements Needs Improvement
and output or result) satisfied. (3 marks) were satisfied. (2.6 mark) were satisfied. (2 marks) (1 mark)

Task 1 (3 marks)

2 Task 2 (3 marks)

Task 3 (3 marks)
Note: For 4 or more tasks, it will be scaled to 9 marks total also: (9 marks / total number of tasks)

All task requirements were Most of the task requirements Some of the task requirements
CONCLUSIONS (3 marks) Needs Improvement (1 mark)
satisfied. (3 marks) were satisfied. (2.6 marks) were satisfied. (2 marks)
Workmanship (3 marks)
3 The work completely satisfied the The work partially satisfied the job Failed to satisfy the job No evidence of quality
Quality of Work (3 marks) job requirements / specifications. requirements / specifications. (2.6 requirements / specifications. workmanship was observed.
(3 marks) marks) (2 marks) (1 mark)

Technical Proficiency (12 marks)


Student manipulates and Student manipulates and
Student manipulates and Student can not manipulate and
Hardware / Software Manipulation and configures hardware and software configures hardware and software
configures hardware and software configure hardware and software.
Configuration Skills (4 marks) with minimum supervision. (3.48 with supervision. (2.68
by himself. (4 marks) (1.34 mark)
marks) marks)

4 Student solves the given problems Student solves the given problems
Student solves the given problems Student can not solve the given
Problem Solving Skills (6 marks) with minimum supervision. (5.2 with supervision. (4
by himself. (6 marks) problems. (2 marks)
marks) marks)

Student troubleshoots and debugs Student troubleshoots and debugs


Student troubleshoots and debugs Student can not solve the given
Troubleshooting / Debugging Skills (2 marks) with minimum supervision. (1.74 the given problems with
by himself. (2 marks) problems. (0.67 mark)
marks) supervision (1.34 mark)

Safety Practice and Housekeeping (2 marks)

5
Date Performed:____________ Date Completed: __________ Date Submitted:__________
Notes:
 Use black or blue pen only. Deduction will be imposed for not following instructions.
 In case of absence, only those with valid reasons are allowed to repeat the experiment.

You might also like