Lab Description:
The purpose of this lab is to execute a few expressions and then find out what the type of each value of expressions is. I found out what the difference between integers, floats, and strings were.
Code:
>>> width = 17 >>> height = 12.0 >>> delimiter = '.' >>> width/2 8 >>> type (8) <type 'int'> >>> width/2.0 8.5 >>> type (8.5) <type 'float'> >>> height/3 4.0 >>> type (4.0) <type 'float'> >>> 1 + 2 * 5 11 >>> type (11) <type 'int'> >>> delimiter * 5 '.....' >>> type('.....') <type 'str'> >>>
Screenshots :