Lab Description:
This lab is just about using python for executing some basic problems from excercise 3 of chapter 2.
Source Code:
>>> width = 17
>>> height = 12.0
>>> delimeter = ‘.’
>>> halfwid = width/2
>>> print halfwid
8
>>> halfwid2 = width/2.0
>>> print halfwid2
8.5
>>> heightby3 = height/3
>>> print heightby3
4.0
>>> addnmultiply = 1 + 2 * 5
>>> print addnmultiply
11
>>> delimeter5 = delimeter * 5
>>> print delimeter5
…..
Screenshot:
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.