![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
power = 0 result = 0 while result <= dec: * *result = 2 ** power * *power = power + 1 print power print result |
|
|
|
|
|
#2 |
|
Expert Programmer
|
It's becuase the variable dec hasn't been defined (as far as I can see from your example, unless there is more code...?
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
When things freez you have to put them in a microwave on defrost, or put them in front of a fire or something. One time my toe froze and i had to put it next to the fire to bring back circulation... it was disgusting...
![]()
__________________
|
|
|
|
|
|
#4 | |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
Quote:
dec = raw_input("Number: ")
power = 0
result = 0
while result <= dec:
* *result = 2 ** power
* *power = power + 1
print power
print result |
|
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 8
![]() |
Thanks for the lovely pic, Tempest...
|
|
|
|
|
|
#6 | |
|
Programmer
|
Quote:
Just try: dec = input("Number: ")And tempest, nice pic :puke: Beeg |
|
|
|
|
|
|
#7 | |
|
Newbie
Join Date: Nov 2004
Posts: 10
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
|
#8 |
|
Programming Guru
![]() ![]() ![]() |
Glad the problem was resolved...
That pic was nasty as hell man.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|