Answer:
Following are the code to this question:
import array as a#import package array
def silence(typecode, length):#defining method silence that accepts two parameters
Val= a.array(typecode, [0]*length)#defining Val variable that stores zeros of the given type code and length
return Val# use return keyword for return Val variable value
typecode = input('Enter typecode value: ')#use input method for input
length = int(input('Enter length value: '))#defining length variable that input integer value
print(*(silence(typecode, length)))#use print method to call silence method
Output:
Enter typecode value: b
Enter length value: 10
0 0 0 0 0 0 0 0 0 0
Explanation:
description of the code: