3 Answers
+ 2
number = int(input("Enter a number: "))
print("2 to the power of", number, "is ->", 2**number)
0
When you write the question:
"What to the power of two? 10"
with an answer of:
"Two to the power of 10 is 1024"
It doesn't really make sense, because: "What to the power of two? 10"
Would be 10**2 or 10 * 10 by the way the question reads,
and your answer: "Two to the power of 10 is 1024",
suggests that you want 2**10 or 2*2*2*2*2*2*2*2*2*2
anyway:
ans = int(input('What power of two? '))
print('Two to the power of', ans, 'is', 2**ans)