P1.-
#Fernando Saldaña
#A01350730
def superpower (a,b):
ans = 1
for i in range(b):
ans = ans * a
return (ans)
print (“Hey lets make some math”)
x = int(input(“Please type a non-negative number so we can raised it: “))
y = int(input(“please type a non-negative number so we can use it as exponent: “))
print(x, ‘raised to the’, y, ‘power is: ‘, superpower(x,y))
P2.-
#Fernando Salaña
#A01350730
def stars (a):
ans = ”
for i in range(a):
ans = ‘*’ + ans
return (ans)
x = int(input(‘Type how many stars you want to see: ‘))
print (stars(x))
QUIZ#06 by fersabal is licensed under a Creative Commons Attribution 4.0 International License.