Announcements

About Registration: Students in probation status must wait for add-drop period where there will be a small increase in course capacity. You won’t be able to take the course by visiting the course coordinators.

  • Midterm date: TBA.
  • Final date: TBA.

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 10%
Midterm 30%
Labs 30%
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 Burçin Sapaz Thursday 08:40-10:30
CE & STAT 2 G111 Merve Asiler Friday 10:40-12:30
MINE & STAT 3 YP-A4 Narin Işık Wednesday 13:40-15:30
ENVE 4 G111 Kadir Ekmekçi Friday 08:40-10:30
GEOE 5 BMB3 Hüseyin Sayın Friday 08:40-10:30
PETE 6 U2 Hakan Gürsoy Thursday 15:40-17:30
Irregular 7 YP-A4 Gökhan Orhan Wednesday 15:40-17:30
Irregular 8 YP-A3 Hazal Moğultay Özcan Monday 15:40-17:30
CHE 9 G111 Hazal Moğultay Özcan Monday 10:40-12:30
AEE 10 G111 Cemil Ulu Friday 13:40-15:30

Weekly Coverage

Week 1 (17.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 Labs.

Week 2 (24.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 Labs.

Week 3 (03.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 Labs.

Week 4 (10.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 Labs.

Week 5 (17.03)

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

Week 6 (24.03)

  • Lecture Topics:
    • Conditional & repetitive execution in Python [continued]: if statements; conditional expression; while & for statements; continue & break; List comprehension; Example problems.
  • Lab Topics: If statement, conditional expression.

Week 7 (31.03)

  • Lecture Topics: No lectures.
  • Lab Topics: No Labs.

Week 8 (07.04)

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

Week 9 (14.04)

  • Lecture Topics:
    • Functions [continued]: Defining functions; Passing parameters; Scope of variables; Recursion; Example definitions.
  • Lab Topics: Repetitive execution & functions (I)

Week 10 (21.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 Labs.

Week 11 (28.04)

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

Week 12 (05.05)

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

Week 13 (12.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 14 (19.05)

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

Week 15 (26.05)

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

Contact

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