Lab description:
This lab is about variables, interactive mode, and script mode. In this lab, exercises 2.2 and 2.7 from chapter 2 of the python book is needed to be completed. The exercises are done in the program python. In exercises 2.2, there are errors since there are no letters to begin the assignment, an assignment starting with numbers cause it to be syntax error.
Source code:
5
x = 5
x + 1
result:6
print 5
print x = 5
print x + 1
result in script: syntax error
width =17
height = 17.0
delimiter = '.'
width/2
result:8.5
width/2.0
result:8.5
height/3
result:4.0
1 + 2 * 5
result:11
delimiter * 5
result:delimiter '.....'
Screenshots: