Python Primer 1: Types and Operators
Python Primer 1: Types and Operators
? 2013 Goodrich, Tamassia, Goldwasser
Python Primer
1
The Python Interpreter
q Python is an interpreted language. q Commands are executed through the Python
interpreter.
n The interpreter receives a command, evaluates that command, and reports the result of the command.
q A programmer defines a series of commands in advance and saves those commands in a text file known as source code or a script.
q For Python, source code is conventionally stored in a file named with the .py suffix (e.g., demo.py).
? 2013 Goodrich, Tamassia, Goldwasser
Python Primer
2
An Example Program
? 2013 Goodrich, Tamassia, Goldwasser
Python Primer
3
Objects in Python
q Python is an object-oriented language and classes form the basis for all data types.
q Python's built-in classes:
n the int class for integers, n the float class for floating-point values, n the str class for character strings.
? 2013 Goodrich, Tamassia, Goldwasser
Python Primer
4
Identifiers, Objects, and the Assignment Statement
q The most important of all Python commands is an assignment statement: temperature = 98.6
n This command establishes temperature as an identifier (also known as a name), and then associates it with the object expressed on the right-hand side of the equal sign, in this case a floating-point object with value 98.6.
? 2013 Goodrich, Tamassia, Goldwasser
Python Primer
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python pandas cbse class xi class xii
- computing laboratory object oriented programming with
- python primer 1 types and operators
- linked lists in python kennesaw state university
- stanford university jay whang and zach maurer python review
- constructors and destructors
- peter wentworth jeffrey elkner allen b downey and chris
- oop in python tutorialspoint
Related searches
- 1 or 2 297 297 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 3 297 297 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 2 905 905 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 3 905 905 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 2 648 648 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 3 648 648 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 2 29 29 1 0 0 0 1 or uskqme9h 168 1 1 username and password verizon
- 1 or 3 29 29 1 0 0 0 1 or uskqme9h 168 1 1 username and password verizon
- 1 or 2 228 228 1 0 0 0 1 168 1 1 username and password verizon
- 1 or 3 228 228 1 0 0 0 1 168 1 1 username and password verizon
- 192 1 or 2 221 221 1 0 0 0 1 1 1 username and password verizon
- 192 1 or 3 221 221 1 0 0 0 1 1 1 username and password verizon