Answer:
1)
n = int(input("Please enter the length of the sequence: "))
print("Please enter your sequence")
product = 1
for i in range(n):
val = int(input())
product *= val
print("The geometric mean is: %.4f"%pow(product,1/n))
2)
print("Please enter a non-empty sequence of positive integers, each one is in a separate line. End your sequence by typing done:")
product = 1
val = input()
n = 0
while(val!="done"):
product *= int(val)
n += 1
val = input()
print("The geometric mean is: %.4f"%pow(product,1/n))
Step-by-step explanation: