<!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 style="COLOR: #000000; FONT-FAMILY: Times New Roman" bgColor=#ffffff>
<BLOCKQUOTE id=0><LABEL id=HbSession SessionId="4060303509"></LABEL>
<DIV>Hey all,</DIV>
<DIV> </DIV>
<DIV>Thought I'd try a mini-calc. Here's the code:</DIV>
<DIV> </DIV>
<DIV># This is a small calculator.<BR>print "Mini Calculator"<BR>print "By
Nathan Pinno"<BR>print<BR>print "CALCULATE MENU"<BR>print "1) Add"<BR>print
"2) Subraction"<BR>print "3) Multiplication"<BR>print "4) Division w/o
remainder"<BR>print "5) Division with remaider"<BR>print "6)
Exponation"<BR>print "7) Square roots"<BR>print "8) Exit"<BR>cal_opt =
int(raw_input("What option would you like: "))<BR>if cal_opt ==
"1":<BR> X = input("First number:" )<BR> Y
= input("Second number:" )<BR> print X, "+", Y, "= ",X +
Y<BR> cal_opt = int(raw_input("Option: "))<BR>elif cal_opt
== "2":<BR> X = input("First number:"
)<BR> Y = input("Second number:" )<BR>
print X, "-", Y, "= ",X - Y<BR> cal_opt =
int(raw_input("Option: "))<BR>elif cal_opt == "3":<BR> X =
input("First number:" )<BR> Y = input("Second number:"
)<BR> print X, "*", Y, "= ",X * Y<BR>
cal_opt = int(raw_input("Option: "))<BR>elif cal_opt ==
"4":<BR> X = input("First number:" )<BR> Y
= input("Second number:" )<BR> if Y ==
0:<BR> print "Division by zero ot
allowed!"<BR> Y = input("Second
number:" )<BR>
else:<BR> print X, "/", Y, "= ",X /
Y<BR> cal_opt =
int(raw_input("Option: "))<BR>elif cal_opt == "5":<BR> X =
input("First number:" )<BR> Y = input("Second number:"
)<BR> if Y ==
0:<BR> print "Division by zero ot
allowed!"<BR> Y = input("Second
number:" )<BR>
else:<BR> print X, "/", Y, "= ",X /
Y," R ", X % Y<BR> cal_opt =
int(raw_input("Option: "))<BR>elif cal_opt == "6":<BR> X =
input("First number:" )<BR> Y = input("Power:"
)<BR> print X, "**", Y, "= ",X**Y<BR>
cal_opt = int(raw_input("Option: "))<BR>elif cal_opt ==
"7":<BR> X = input("Number to find the square root of:"
)<BR> print "The square root of", X, " =
",X**0.5<BR> cal_opt = int(raw_input("Option: "))<BR>elif
cal_opt == "8":<BR> print
"Goodbye!"<BR>else:<BR> print "That's not an option. Try
again."<BR> cal_opt = int(raw_input("Option: "))<BR></DIV>
<DIV>Here is the screen output:</DIV>
<DIV> </DIV>
<DIV>Mini Calculator<BR>By Nathan Pinno</DIV>
<DIV> </DIV>
<DIV>CALCULATE MENU<BR>1) Add<BR>2) Subraction<BR>3) Multiplication<BR>4)
Division w/o remainder<BR>5) Division with remaider<BR>6) Exponation<BR>7)
Square roots<BR>8) Exit<BR>What option would you like: 7<BR>That's not an
option. Try again.<BR>Option: 3<BR>3*4<BR>12<BR>>>> </DIV>
<DIV> </DIV>
<DIV>Why does it run this way instead of going to the proper equation?</DIV>
<DIV> </DIV>
<DIV>Appreciating the help so far,</DIV>
<DIV>Nathan Pinno<BR></DIV></BLOCKQUOTE>
<P></P></BODY></HTML>