J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:03

T: 02/10/2018

Master in Informatics and Computing Engineering
Programming Fundamentals
Instance: 2018/2019


Lecture #3 :: 02/10/2018

Goals

By the end of this class, the student should be able to:

  • Describe how to import and do simple graphics with the module "turtle"
  • Describe an instance of Turtle, its own attributes and methods
  • Describe the flow of execution of the for loop
  • Describe the range function

Content

  • 3.1. Hello, little turtles!
    • 3.1.1 Our first turtle program
    • 3.1.2 Instances — a herd of turtles
    • 3.1.3 The for loop
    • 3.1.4 Flow of Execution of the for loop
    • 3.1.5 The loop simplifies our turtle program
    • 3.1.6 A few more turtle methods and tricks
    • Exercises

Bibliography

  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3, 2012 [PDF 2018] (Section 3.1)

Materials

  • J. Correia Lopes, Illustrations presented in class, 03-turtles.pdf
  • FPRO, 2018/19, Code present in class, Lecture's on GitHub
  • Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, How to Think Like a Computer Scientist — Learning with Python 3 (RLE), 2012, [HTML] (Chapter 3)
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers [HTML] (Chapter 3)

Summary

  • Import a module. Simple graphics in Python. Flow of execution of the for loop. The range function.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/03.txt · Last modified: 01/10/2018 09:07 by Correia Lopes