Programming with Python - Marquette University
Programming with Python
Thomas Schwarz, SJ
Python Modules
Creating Scripts
? Scripts are les with a .py extension
? Generate from IDLE
? File -> New File
? Then save le
? File -> Save As
i i f f
Variables and Types
? All program languages specify how data in memory
locations is modi ed
? Python: A variable is a handle to a storage location
? The storage location can store data of many types
? Integers
? Floating point numbers
? Booleans
? Strings
if
Variables and Types
? Assignment operator = makes a variable name refer to a memory
location
? Variable names are not declared and can refer to any legitimate type
a = 3.14156432 b = "a string" a
b
3.14156432 "a string"
? Create two variables and assign
values to them
? Variable a is of type oating point
and variable b is of type string
a = b a b
3.14156432 "a string"
? After reassigning, both variable
names refer to the same value
? The oating point number is garbage
collected
lf lf
................
................
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
- bringing your python
- chapter 1 scalar variables and data types
- lecture 2 python data type and variables data data type
- python programming an introduction to computer science
- basic python programming for loops and reading files
- python lesson 2 variables operations and types
- working with functions in python
- programming with python marquette university
Related searches
- sql programming with python
- programming with java pdf
- hands on programming with r pdf
- statistics with python pdf
- marquette university high school athletics
- marquette university high school baseball
- marquette university high school basketball
- marquette university high school hockey
- marquette university high school football
- marquette university hockey
- statistical modeling with python pdf
- marquette university hockey team