[Tutor] Calculator function silly questions
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 21 Jun 2001 12:53:42 +0100
------_=_NextPart_001_01C0FA48.D1659A60
Content-type: text/plain; charset="iso-8859-1"
print "Answer: %d" % (int(a)*int(b))
That worked really well. My question is What is happening in the third
line?
...
What exactly is importing a string is this something I have to add to
Python. Please try not to laugh to hard when you answer that. I thought
Strings input returned a number but I am really not sure of that.
These and several other questions are answered in my tutor.
Thinking Like a CS is a fine tutor but takes a slightly different
tack to mine. Compare the two and you will often find the answer in one that
the other misses out.
------_=_NextPart_001_01C0FA48.D1659A60
Content-type: text/html; charset="iso-8859-1"
<!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 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
<DIV>
<DIV><FONT size=2><EM>print "Answer: %d" % (int(a)*int(b))</EM></FONT></DIV>
<DIV><FONT size=2><EM> </EM></FONT></DIV>
<DIV><FONT size=2> That worked really well. My question is What is
happening in the third line? <SPAN class=670310012-21062001><FONT
color=#0000ff face="Courier New"> </FONT></SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN
class=670310012-21062001>...</SPAN></FONT></DIV>
<DIV><FONT size=2>What exactly is importing a string is this something I have
to add to Python. Please try not to laugh to hard when you answer that. I
thought Strings input returned a number but I am really not sure of
that.</FONT></DIV>
<DIV> </DIV></DIV></BLOCKQUOTE>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN
class=670310012-21062001>These and several other questions are answered in my
tutor.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN
class=670310012-21062001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN
class=670310012-21062001>Thinking Like a CS is a fine tutor but takes a slightly
different </SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face="Courier New" size=2><SPAN
class=670310012-21062001>tack to mine. Compare the two and you will often find
the answer in one that the other misses out.</SPAN></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C0FA48.D1659A60--