Lab Description:
In this lab I programmed some simple operations using the print, comment (#), type, and some operations. Variables have to be define and these values are set. The print feature allows you display your program in interactive mode, other wise the interactive mode won’t display your information. I used comments in order to remember what I was doing.
Source Code:
width = 17 print ('width = 17') height = 12.0 print ('height = 12') delimiter = '.' print ( " delimiter = '.'") print ( " width / 2 ")# first question print ( width / 2) print ( type(width / 2 ) ) print ( "width/2.0")# second question print ( width / 2.0 ) print ( type( width / 2.0 ) ) print ( " height / 3 " )# third question print ( height / 3 ) print ( type( height / 3 ) ) print ( " 1 + 2 * 5 " ) # 4th question print ( 1 + 2 * 5 ) print ( type ( 1 + 2 * 5 )) print ( " delimiter * 5 " )# 5th question print ( delimiter * 5 ) print ( type ( delimiter * 5) )