Lecture5

G comments to illustrate the usage of a funcon

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: thon3” –  Use symbolic link to switch your default Python Prerequisite 1: Basics of other languages •  C/C++ –  Variable, type –  Control structure –  Func*on •  C++ –  class •  Shell scrip*ng Prerequisite 2: Indent not “{}” •  “{}” in C/C++: use to encapsulate code block Prerequisite 2: Indent not “{}” •  In Python, use indent instead of “{}” –  Indent must be consistent –  Space is different from tab Variable •  Similar to shell scrip*ng –  No need to declare before using •  Dynamic typing –  Not bound to a type –  E.g., first assign a int, later assign a string String •  String can be expressed in –  Single quotes –  Double quotes –  Triple quotes DocStrings •  A special kind of strings that provides document in the program –  E.g., comments to illustrate the usage of a func*on •  Conven*on: a triple quoted mul*- line string Control Structures •  If- elif- else •  for- in •  while Func*on & Class •  Func*on –  De...
View Full Document

This note was uploaded on 10/17/2013 for the course CS 35L taught by Professor Eggert during the Fall '09 term at UCLA.

Ask a homework question - tutors are online