welcome to the course
play

Welcome to the Course Hans-Joachim Bckenhauer and Dennis Komm - PowerPoint PPT Presentation

Welcome to the Course Hans-Joachim Bckenhauer and Dennis Komm Digital Medicine I: Introduction to Programming Introduction to the Course Autumn 2019 October 3, 2019 Material The Team Lecturers Hans-Joachim Bckenhauer Dennis Komm


  1. Welcome to the Course Hans-Joachim Böckenhauer and Dennis Komm Digital Medicine I: Introduction to Programming Introduction to the Course Autumn 2019 – October 3, 2019 Material The Team Lecturers Hans-Joachim Böckenhauer Dennis Komm Lecture website Assistants Fabian Frei https://courses.ite.inf.ethz.ch/digiMed19 Lea Fritschi Sarah Kamp Jean Kaufmann Safira Piasko Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 1 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 2 / 37

  2. Appointments Goal of Today’s Lecture Lecture Thursday, 8:15 – 10:00, HG D 7.2 Introduction to computer model and algorithms Exercises Monday, 13:15 – 15:00, CAB H 56 General information about the lecture Thursday, 10:15 – 12:00, HG D 7.2 The first Python program Exam Thursday, 12.12.2019 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 3 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 4 / 37 Computer – Concept What does a computer have to be able to do to compute? Does it have to be able to multiply? Isn’t it sufficient to be able to add? Introduction to the Course Computer Model and Algorithms Turing Machine [Alan Turing, 1936] Finite number of states Memory consisting of arbitrarily many cells Alan Turing [Wikimedia] Pointer to current cell Pointer can change cell’s content and move left or right Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 5 / 37

  3. Computer – Implementation Computer – Implementation Analytical Engine – Charles Babbage (1837) Components of von Neumann Architecture Z1 – Konrad Zuse (1938) Processor – CPU Memory for programs and data, e.g., ENIAC – John von Neumann (1945) Arithmetic unit random access memory (RAM) Control unit ALU Processor (CPU) for processing of programs and data BUS I/O components to communicate with Memory In-/Output periphery Charles Babbage [Wikimedia] Konrad Zuse [Wikimedia] John von Neumann [Wikimedia] Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 6 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 7 / 37 Memory for Program and Data Processor Sequence of bits Program data: Values of all bits The processor Composition of bits to memory cells (8 bits = 1 byte) executes commands in machine language Every memory cell has an address has its own “fast” memory (registers) Random access : Access time (almost) independent of address can read and write the main memory is able to execute a large number of simple operations (e.g., adding the contents of two registers) 0 1 0 0 1 1 0 1 0 0 1 0 1 1 1 0 Address: 17 Address: 18 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 8 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 9 / 37

  4. Algorithm: Central Notion of Computer Science “The Oldest (Known) Non-Trivial Algorithm” Euclid’s Algorithm Algorithm from Euclid’s Elements , 300 BC Method for step-by-step solution of a problem Input: integers a > 0 , b > 0 Execution does not require intellect, only accuracy Output: gcd of a and b after Muhammad al-Chwarizmi ; author of a arabic Input: a and b math book (around 825) while b != 0: if a > b : a = a − b else: b = b − a Output: a a b a b a b a b "‘Dixit algorizmi. . . "’ Latin translation [Wikimedia] Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 10 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 11 / 37 Computer Science in Medicine computer science medical problem modeling problem A ACTGCATGGC A C C G G T A C G T C A Introduction to the Course C communication between G A A T C G C A medicine and comp. science algorithmics, Computer Science in Medicine ? concepts of programming e g n d e e e d l s w o b a n s i c k solution to solution to comp. medical problem science problem interpretation ACGCTAAGCACTGCATGGCCAA Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 12 / 37

  5. Projects During the semester, you work on three projects Introduction to the Course The project tasks will be published on 17.10. Projects 07.11. 21.11. You work on the tasks on your own The exercise hours are meant for answering your questions Presentation of the solutions via the PELE system Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 13 / 37 Projects Python Tutorial The projects will be presented in the exercise hours Easy introduction to Python, no previous knowledge necessary Presentation and discussion with assistants Time needed: roughly two hours Teams of 2 students each Grading by assistants, feedback by students Tutorial website Presentation is mandatory https://frontend-1.et.ethz.ch/module/qzQwyaLk8yMWsYxqR but without effect on the grade Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 14 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 15 / 37

  6. Programming Tools Editor: Program to modify, edit and store Python program texts Compiler: Program to translate a program text into machine language Introduction to Python (intermediate code, respectively) Computer: Machine to execute machine language programs Operating System: Program to organize all procedures such as file handling, editing, compiling, and program execution Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 16 / 37 English vs. Programming Language Syntax and Semantics English “Science is what we understand well enough to explain to a computer. Like our language, programs have to be formed according to certain rules Art is everything else we do. ” Syntax: Connection rules for elementary symbols (characters) Semantics: Interpretation rules for connected symbols D ONALD K NUTH Corresponding rules for a computer program are simpler, but also more strict Python because computers are relatively stupid # computation b = a * a # b = a**2 b = b * b # b = a**4 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 17 / 37 Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 18 / 37

  7. Kinds of Errors Illustrated with English Language The car drove too fast. Syntactically and semantically correct Thecar drove too fsat. Syntax error: word building Red the car is. Syntax error: word order Introduction to Python I find inspiration in cooking Syntax error: missing punctuation marks my dog and my cat Used Software She is not tall and red-haired. Syntactically correct, but ambiguous [no analogon] Syntactically correct, but gramatically and semanti- I own an red car. cally wrong: wrong article [type error] Syntactically and gramatically correct, but semanti- The bike gallops fast. cally wrong [run-time error] Syntactically and sematically correct, but ambiguous We saw her duck. [no analogon] Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 19 / 37 Used Software There are numerous Python development environments (IDEs) These contain an editor and several tools Introduction to Python We use PyCharm Education A First Python Program ➯ https://www.jetbrains.com/pycharm-educational/download/ ➯ Download the Community Edition Also recommended: TigerJython ➯ https://webtigerjython.ethz.ch Digital Medicine I: Introduction to Programming – Introduction to the Course Autumn 2019 Böckenhauer, Komm 20 / 37

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend