Newbie: Help Figger Out My Problem
Scott David Daniels
Scott.Daniels at Acm.Org
Tue Jun 28 12:35:07 EDT 2005
db wrote:
> On Tue, 28 Jun 2005 00:23:30 -0700, ChuckDubya wrote:
>>... if flips >= 99:
>> print "Heads: " + heads
>> print "Tails: " + tails
>> print "Total: " + flips + "flips"
>>raw_input("Press the enter key to exit.")...
>
> Your programm gives an error. You are trying to concatenate strings with integers.
>
Might I suggest you were looking for this:
...
print "Heads: ", heads
print "Tails: ", tails
print "Total: ", flips, "flips"
...
--Scott David Daniels
Scott.Daniels at Acm.Org
More information about the Python-list
mailing list