chapter1

Page 1: Introduction

  • Course Code: BDA 24202

  • Title: Introduction to Computer & Programming

  • University: Universiti Tun Hussein Onn Malaysia (UTHM)

  • Global Ranking: #1001-1200

  • Educational Classification: UNESCO Tech Institution, UNEVOC Network Member

Page 2: About the Course

  • Lecture Format: 42 hours total (14 weeks x 3 hours per week)

  • Course Synopsis:

    • Introduction to programming concepts using Python

    • Focuses on:

      • Basic programming to real-world applications

      • Data types

      • Control structures

      • Common operations

      • Arrays and functions

      • Object-oriented programming (OOP)

      • Graphical User Interface (GUI) development

Page 3: Getting Started with Python Programming

  • Initial Steps:

    • Download Python software

    • Familiarize with the software layout

    • Use the Python interpreter

    • Set up the environment (modules, packages, libraries)

    • Call libraries/modules from existing packages

Page 4: Learning Outcomes

  • Engineering Knowledge: Apply problem-solving techniques using algorithms

  • Modern Tool Usage: Develop programs to solve problems using programming languages

  • Life Long Learning: Present project findings in oral and written formats for individual/group assignments

Page 5: Course Contents

  • Chapter 1: Introduction To Computer And Programming

    • 1.1 Intro to Computer Programming

    • 1.2 Programming Languages in Engineering Applications

    • 1.3 Flow Chart and Pseudo Code

  • Chapter 2: Structure of Programming Language

    • 2.1 Introduction to Programming Structure

    • 2.2 Basic Syntax (variables, comments, indentation)

    • 2.3 Data Types: primitive types & conversion

  • Chapter 3: Input and Output Data

    • 3.1 Data Processing

    • 3.2 File Processing

    • 3.3 Error Handling in I/O

Page 6: Course Contents Continued

  • Chapter 4: Operator Expressions

    • 4.1 Mathematical Operators

    • 4.2 Conditional Operators

    • 4.3 Relational and Logical Operators

    • 4.4 Assignment Operators

  • Chapter 5: Control Statements

    • 5.1 Basic Control Statements (if, else)

    • 5.2 Types of Loops

  • Chapter 6: Arrays

    • 6.1 Single Array

    • 6.2 Multidimensional Array

    • 6.3 Built-in List Methods

Page 7: Advanced Topics

  • Chapter 7: Functions

    • 7.1 Definition of Function

    • 7.2 Function Types (simple, multiple)

    • 7.3 Function Prototypes

    • 7.4 Function Calls

  • Chapter 8: Object-Oriented Programming (OOP) & GUI Development

    • 8.1 Introduction to OOP

    • 8.2 Inheritance and Polymorphism

    • 8.3 GUI Development (Tkinter, layout design)

Page 8: Assessment Criteria

  • Continuous Assessment:

      1. Test 1 (Week 6): 15%

      1. Test 2 (Week 12): 15%

      1. Lab Assessments (Weeks 1-13): 30%

      1. Group Project (report & presentation): 40% (Week 14)

Page 9: Attendance Policy

  • Minimum Requirement: 80% attendance (including online lectures)

  • Consequences for Non-Compliance:

    • No further attendance or assessments if under 80%

    • Zero marks for missed assessments.

    • In HW courses, Failure Attendance (HG) grade will be given if under 80%

  • Dress regulations must be adhered to avoid disciplinary actions.

Page 10: References

  • Joseph, L. & Johny, A. (2022). Fundamentals of Python for Robotics Programming. Springer Nature.

  • Sundnes, J. (2020). Introduction to Scientific Programming with Python. Springer Nature.

  • Massaron, L. & Mueller, J. P. (2015). Python for Data Science for Dummies. Wiley.

Page 11: Importance of Programming Skills

  • Job Requirements: Skills are essential in today's job market.

  • Industry Revolution 4.0: Knowledge in IoT, AI, and Big Data increases relevance.

  • Higher Salaries: Enhanced employability and potential for higher wages.

Page 12: Examples of Programming Languages

  • Popular Languages: Python, Java, C, C++, Visual Basic, Fortran

Page 13: Writing a Program

  • Steps to Follow:

    1. Determine necessary steps for the task.

    2. Write the algorithm in pseudocode or flowchart.

    3. Translate into a programming language.

    4. Debug and test the program.

Page 14: Algorithm Definition

  • Definition: A set of unambiguous instructions to solve a problem, halting in finite time.

  • Categories of Algorithmic Operations:

    • Sequential operations

    • Conditional operations

    • Iterative operations (loops)

Page 15: Example Algorithm for Linear Equation

  • Given y = mx + c:

    • Step 1: Determine m value

    • Step 2: Determine x value

    • Step 3: Determine c value

    • Step 4: Compute y by substituting m, x, and c in the equation.

Page 16: Understanding Pseudocode

  • Definition: A sequence of steps written in English similar to recipe instructions; orderly sequence is critical.

Page 17: Pseudocode Rules

  1. Statements should be in sequence.

  2. Each step must have keywords.

  3. Indentation for continued steps.

  4. Use if/else for conditions, while/do for repetition.

  5. Steps must be clear and understandable.

Page 18: Sample Pseudocode

  • Task: Add two numbers

  • Steps:

    • Start

    • Get two numbers, a and b

    • C = a + b

    • Display c

    • End

Page 19: Flowchart Example

  • Flowchart illustrating above pseudocode:

    • Start

    • Get numbers a and b

    • C = a + b

    • Display c

    • End

Page 20: Flowchart Symbols

  • Key Symbols:

    • Rectangular: Process/Action

    • Oval: Start/End

    • Diamond: Decision (Yes/No)

    • Flowlines: Sequence of operations

Page 21: Flowchart Symbol Details

  • START/END: Represents the commencement and conclusion of processes.

Page 22: Input/Output Symbol

  • Definition: Indicates data input into a program or output displayed.

Page 23: Process Symbol

  • Use: Shows calculations or data storage processes.

Page 24: Decision Symbol

  • Function: Represents a binary choice (true/false) in program flow.

Page 25: Flowchart Structures

  • Types of Structures:

    • Selection, Sequence, and Iteration represented in flowcharts.

Page 26: Loops and Iteration

  • Concept: Repetition of commands in a program. Can be based on counters or conditions.

Page 27: Types of Loops

  • Examples:

    • For loop, While loop

Page 28-32: Exercises**

  • Various exercises for students to apply knowledge in developing flowcharts and pseudocode based on specified tasks.

  • Tasks include salary calculations, evaluating conditions, and function evaluations.

Page 33: Final Questions

  • Open for any questions or additional clarifications regarding the course content.

Page 34: Closing

  • Thank you for your attention; stay tuned for further details and upcoming requirements.