Instructions:
Install Python
- Go to http://python.org, click on the Download tab, and select the appropriate version based on your operating system.
- After download, install python on your computer.
- Get familiar with python by reading the documentation on the site (The tutorial is an good starting point http://docs.python.org/3/tutorial/)
- Complete Exercise 2 and Exercise 3 from chapter 2 of the python book.
- After completing Exercises 2 and 3, post into your OpenLab portfolio the following items:
- Lab description and your experience doing it in your own words.
- Screenshots of the code you typed.
- Screenshots of the results you got.
- https://mail.google.com/mail/?ui=2&ik=8ae8e88c3e&view=att&th=13d02d87d6b29078&attid=0.1&disp=safe&realattid=f_hdhlct7a0&zw
Raymond Barimah
Lab 2 variables
section 9304
2/19/13
import math
radiusstring = input (“Enter the radius”)
radiusfloat = float (radiusstring)
area = math * pi * radiusfloat * radiusfloat
print (“The area of a circle with the radius is”) area
Enter the radius of the circle: 4
area = 50.24
Enter the radius of the circle:3
area= 28.26
Enter the radius of the circle:6
area= 113.04
Enter the radius of the circle:10
area= 62.83
input (” input two set of points (4, 3) and (10, 6) “)
D = squrt (x2-x1)**2 + (y2-y1)**2
print “The distance of the points (4,3) and (10,6) is 6.708