J. Correia Lopes

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:02

T: 27/09/2018

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


Lecture #2 :: 27/09/2018

Goals

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

  • Describe and distinguish the concepts of variable, location, value, type
  • Identify the Python reserved words
  • Describe the concepts of statement and expression
  • Identify some of the Python operands and their precedence
  • Use operators with suitable operands
  • Describe the Python cast operations and use them
  • Describe how to get input, at runtime, from a user of the program

Content

  1. Simple Python Data
    • Variables, expressions and statements
    • 2.1 Values and data types
    • 2.2 Variables
    • 2.3 Variable names and keywords
    • 2.4 Statements
    • 2.5 Evaluating expressions
    • 2.6 Operators and operands
    • 2.7 Type converter functions
    • 2.8 Order of operations
    • 2.9 Operations on strings
    • 2.10 Input
    • 2.11 Composition
    • 2.12 The modulus operator
    • 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] (chapter 2)

Materials

  • J. Correia Lopes, Illustrations presented in class, 02-simple.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 2)
  • Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers [HTML] (Chapter 2)
  • Moodle, Official App for Android at the Play Store

Summary

  • Simple Python Data. Variables, expressions and statements. Operators and precedence. Values, data types, and type casts. Operations on strings. Input.

FPRO, 2018/19

« Previous | Index | Next »

teach/fpro/lectures/02.txt · Last modified: 26/09/2018 19:23 by Correia Lopes