View Single Post
Old Nov 20th, 2004, 1:02 PM   #6
Beegie_B
Programmer
 
Join Date: Nov 2004
Location: Windsor, Ontario, Canada
Posts: 32
Rep Power: 0 Beegie_B is on a distinguished road
Send a message via ICQ to Beegie_B Send a message via MSN to Beegie_B
Quote:
Originally posted by mfo6463@Nov 20 2004, 06:03 PM
dec = raw_input("Number: ")
power = 0
result = 0
while result <= dec:
  result = 2 ** power
  power = power + 1
print power
print result
It's because dec is a string variable because of the "raw_input" command.

Just try:
dec = input("Number: ")
That should fix your problem

And tempest, nice pic :puke:
Beeg
Beegie_B is offline   Reply With Quote