<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Here's the message:</DIV>
<DIV> File "D:\Python22\prog4.py", line 19<BR> while
option != 9:<BR> ^<BR>SyntaxError:
invalid syntax<BR></DIV>
<DIV>And the code:</DIV>
<DIV>#This program finds the area and perimeter of circles, rectangles, and
squares.<BR>def menu():<BR> print '1) Area
(Circle)'<BR> print '2) Area
(Rectangle)'<BR> print '3) Area
(Square)'<BR> print '4) Perimeter
(Circle)'<BR> print '5) Perimeter
(Square)'<BR> print '6) Perimeter
(Rectangle)'<BR> print '9) Exit'</DIV>
<DIV> </DIV>
<DIV>import math<BR>print 'By Nathan Pinno'<BR>print 'ID#
2413448'<BR>print<BR>print 'Program 4 - Functions'<BR>print<BR>menu()<BR>option
= int(raw_input('Option (1,2,3,4,5,6,9): ')<BR>while option !=
9:<BR> if option ==
1:<BR> r = int(raw_input('Radius:
')<BR> print 'The area of the circle =
',pi*(r**2)<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR> elif option ==
2:<BR> l = int(raw_input('Length:
')<BR> w = int(raw_input('Width:
')<BR> print 'The area of the
rectangle = ',l*w<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR> elif option ==
3:<BR> s = int(raw_input('Side:
')<BR> print 'The area of a square =
',s**2<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR> elif option ==
4:<BR> d = int(raw_input('Diameter:
')<BR> print 'The perimeter of the
circle = ',pi*d<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR> elif option ==
5:<BR> l = int(raw_input('Length:
')<BR> w = int(raw_input('Width:
')<BR> print 'The perimeter of the
rectangle = ',(2*l)+(2*w)<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR> elif option ==
6:<BR> s = int(raw_input('Side:
')<BR> print 'The perimeter of a
square = ',s*4<BR> option =
int(raw_input('Option (1,2,3,4,5,6,9): ')<BR>
else:<BR> print 'That is not an
option. Please choose an option.'<BR>
option = int(raw_input('Option (1,2,3,4,5,6,9): ')<BR>print
'Goodbye.'<BR></DIV></BODY></HTML>