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))
Explanation:
Select all answers for #4
If you print the binary digits just like that, they'll be in the wrong order (lsb to msb). Below program uses recursion to print the digits msb to lsb. Just for fun.
void printBits(unsigned int n)
{
if (n > 1) {
printBits(n >> 1);
}
printf((n & 1) ? "1" : "0");
}
int main()
{
unsigned int number;
printf("Enter an integer number: ");
scanf_s("%d", &number);
printBits(number);
}
I believe the answer would be "shared". Just like with open source software, people can modify it, use it, and share the modifications made to the software. I hope this helps!
Sending rovers and other explorers I think