print('10 -> 2 [bd], 2 -> 10 [db]')
answ=input('select db or bd : ')
if answ == "db":
a=input('enter a digit')
x=int(a)
list1 = []
while (x):
x%2
x//2
if x==0:
break
I began creating this on python 3.2, but then I had to move on python 2.7.5 and I get the following error message:
Traceback (most recent call last):
File "C:\Users\<file path>", line 3, in <module>
answ=input('select db or bd : ')
File "<string>", line 1, in <module>
NameError: name 'db' is not defined
>>>
I really don't know hat is all about, worked pretty fine on python 3.2 (sorry for my bad english).