Usama Amir 09/25/13 EMT1111D304
Objective: introduction to python
width = 17 height = 12.0 delimiter = '.'
For each of the following expressions, write the value of the expression and the type (of the value of the expression).
- width/2
- width/2.0
- height/3
- 1 + 2 * 5
- delimiter * 5
Use the Python interpreter to check your answers.
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
Type “copyright”, “credits” or “license()” for more information.
>>> width=17
>>> height=12.0
>>> delimeter=’.’
>>> width/2
8.5
>>> width/2.0
8.5
>>> height/3
4.0
>>> 1+2*5
11
>>> delimeter*5
‘…..’
>>>