Announcements

  • Midterm date: April 30, 18:00.
  • Final date: June 13, 09:30.

Objectives

This course gives a brief introduction to a working understanding of basic computer organization, data representation, programming language constructs, and algorithmic thinking. It is designed as a first course of programming and supported by laboratory sessions for students outside of the Computer Engineering major.

Textbook

Programming with Python for Engineers, by S. Kalkan, O. T. Şehitoğlu and G. Üçoluk. Available at: https://pp4e-book.github.io/

Grading

Attendance 5%
Midterm 30%
Labs 35%
Final 30%

Course Conduct

The flow of this course has 2 hours of in-class (theoretical) lectures + 2 hours of laboratory work. In addition, the theoretical part has Midterm and Final exams.

This has been altered as follows:

Weekly:

  • In a pre-scheduled (see: Schedule section below) session, the lecturer will perform the subject review and a recitation (going over programming examples) of that week’s topics.
  • Starting with the 4th week, there will be a lab session held at MM-14. Here the students will be given a programming environment and a task that they will code in a given duration.

About Exams:

  • Midterm exam and final exam will be in class.

Course Material

Supplementary Material

Useful links on WEB [mostly from wiki.python.org]

Schedules

DEPT SECTION PLACE LECTURER TIME
CE 1 G111 Kadir EKMEKÇİ Thursday 08:40-10:30
CE & STAT 2 G111 Hazal MOĞULTAY Friday 10:40-12:30
STAT & MINE 3 YP-A4 Gökhan ORHAN Wednesday 13:40-15:30
ENVE 4 G111 Alaettin ZUBAROĞLU Friday 08:40-10:30
GEOE 5 BMB3 Hüseyin SAYIN Friday 08:40-10:30
PETE 6 U2 Alper KOCATAŞ Thursday 15:40-17:30
Irregular 7 YP-A4 Çiğdem AVCI Wednesday 15:40-17:30
Irregular 8 YP-A3 Ahmet COŞAR Monday 15:40-17:30
CHE 9 G111 Hazal MOĞULTAY Monday 10:40-12:30
AEE 10 G111 Çağrı ESER Friday 13:40-15:30

Weekly Coverage

Week 1 (19.02)

  • Lecture Topics:
    • Introduction: Course content, objectives, outline; Grading; Information about the homeworks, the labs, the exams.
    • Basic computer organization: Von Neumann arch, CPU, RAM and their interaction during program execution, stored program, Peripherals, OS.
  • Lab Topics: No Lab.

Week 2 (26.02)

  • Lecture Topics:
    • A Broad Look at Programming and PL: Concept of Algorithm, Comparing algorithms, World of PLs, Low-High level PL, Interpreter vs Compiler, Programming Paradigms, Python as a PL.
    • Representation of data in computers: Two’s complement representation of integers, IEEE floating-point representation, Information loss with Floating Points, representation of characters, text and Boolean.
  • Lab Topics: No Lab.

Week 3 (04.03)

  • Lecture Topics:
    • Introduction to Python: Numbers and Boolean values in Python, Container data in Python (str, tuple, list, dict, set); Mutable - immutable data; aliasing problem.
  • Lab Topics: No Lab.

Week 4 (11.03)

  • Lecture Topics:
    • Introduction to Python [continued]: Operators and Expressions; Type casting; Statement in Python; Variables and Assignment; Basic I/O in Python.
  • Lab Topics: Demo Lab.

Week 5 (18.03)

  • Lecture Topics:
    • Conditional & repetitive execution in Python: if statements; conditional expression; while & for statements; continue & break; List comprehension; Example problems.
  • Lab Topics: Numbers & Containers.

Week 6 (25.03)

  • Lecture Topics:
    • Conditional & repetitive execution in Python [continued]: if statements; conditional expression; while & for statements; continue & break; List comprehension; Example problems.
  • Lab Topics: Expressions, Variables, Basic I/O.

Week 7 (01.04)

  • Lecture Topics:
    • Functions: Defining functions; Passing parameters; Scope of variables; Recursion; Example definitions.
  • Lab Topics: If statement, conditional expression.

Week 8 (15.04)

  • Lecture Topics:
    • Functions [continued]: Defining functions; Passing parameters; Scope of variables; Recursion; Example definitions.
  • Lab Topics: Conditional and repetitive statements & expressions.

Week 9 (22.04)

  • Lecture Topics:
    • Object-oriented Programming (OOP) Concepts: Class definition; Member functions & variables; Message passing; Encapsulation; Inheritance; Polymorphism; Basics of OOP in Python.
  • Lab Topics: No lab.

Week 10 (29.04)

  • Lecture Topics:
    • File handling: Files and Sequential access; Parsing; Termination of Input; Formatting output; binary files.
  • Lab Topics: No lab.

Week 11 (06.05)

  • Lecture Topics:
    • Exception handling and Debugging: Kind of errors; Exceptions; Debugging techniques.
  • Lab Topics: Repetitive execution & functions.

Week 12 (13.05)

  • Lecture Topics:
    • Engineering and scientific libraries for Python: Libraries and tools for numerical & scientific calculations (arrays, n-D arrays, slicing, basic operations on arrays, commonly used functions, algebraic functions etc.).
  • Lab Topics: OO operations on built-in objects.

Week 13 (20.05)

  • Lecture Topics:
    • Engineering and scientific libraries for Python [continued]: Data handling & analysis, and plotting. Illustration of these tools with examples.
  • Lab Topics: File handling.

Week 14 (27.05)

  • Lecture Topics:
    • An Application: Approximation & optimization.
    • An Application: Solving a simple regression problem.
  • Lab Topics: No lab.

Contact

Please use the following email address for course related issues: 2xx [@] ceng [dot] metu [dot] edu [dot] tr