0

Is there any value that represents every number in python?

I am making a denary to binary converter ?in which I need to have 2 to the power of every number. Is there any way that I could do this

12th May 2018, 2:07 PM
Thomas
Thomas - avatar
2 Answers
+ 1
print(bin(eval(input("enter a number "))))
12th May 2018, 3:55 PM
Etabeta1🇼đŸ‡č
Etabeta1🇼đŸ‡č - avatar
0
so how would I do 2 to the power of every number. it's supposed to be: if input is a 2 to the power of something
12th May 2018, 3:58 PM
Thomas
Thomas - avatar