Answer:
Written in Python:
def powerss(base, limit):
outputlist = []
i = 1
output = base ** i
while limit >= output:
outputlist.append(output)
i = i + 1
output = base ** i
return(outputlist)
Step-by-step explanation:
This declares the function
def powerss(base, limit):
This creates an empty list for the output list
outputlist = []
This initializes a counter variable i to 1
i = 0
This calculates base^0
output = base ** i
The following iteration checks if limit has not be reached
while limit >= output:
This appends items to the list
outputlist.append(output)
The counter i is increased here
i = i + 1
This calculates elements of the list
output = base ** i
This returns the output list
return(outputlist)