Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("This program will calculate 2 to the power of n")
- print("How many powers do you want to calculate?")
- loop = int(input("n = "))
- value = 0
- print()
- for i in range(0, loop + 1):
- value = 2 ** i
- print("2 to the power",i,"is equal",value)
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement