1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sweet [91]
3 years ago
10

Write a function silence (typecode, length) that returns a new data array containing all zeros of the given type code and length

.
python programming
Computers and Technology
1 answer:
lions [1.4K]3 years ago
7 0

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:

  • In the above-given Python code, Firstly we import a package that is the array, after that a method "silence" is defined that accepts two variables in its parameter that is "typecode and length".
  • Inside the method, the "Val" variable is declared, which is used to calculate and store all zeros of the typecode and length variable.
  • Outside the method, "typecode and length variable" is used for input the value from the user end-use the print method to call the function "silence" with an asterisk.
You might be interested in
PLEASE HELP ME Jimmy and his friends are creating a rock band and have decided to turn his garage into a recording studio. He wa
Tems11 [23]

Answer:

D.  a studio monitor

Explanation:

A studio monitor is an electrical equipment that is used to enhance the quality of sound or music. It work like a speaker that can be used professionals to record audio songs, to make films and some other applications with good quality. It is usually used in studios where producer must ensures that the quality of music. As in music industry the quality of music depends on the quality of instrument used for the purpose of recording.

<em>This is the reason that, Jimmy and his friends should choose a Studio Monitor to achieve the most accurate sound quality.</em>

6 0
2 years ago
Which of the following views would you use to see your Web page while working on it?
brilliants [131]
D) Alt Tags thats the answer i think
8 0
3 years ago
Please help!! will fan and medal
levacccp [35]
So here are the answers that would best complete the given statements above.
1. <span>The standard resolution for graphics on the Web is 72 dpi.
2. </span> The larger the <span>resolution, the larger the file size.
3. </span>An Inline <span>image is an image that appears on a Web page.
4. File </span><span>size, download times, and the number of colors are factors that will help you decide which graphic format you should use.
5. </span> Adobe Photoshop <span>is an image editing program.
6. The IMG tag </span><span>s used to bring an image into a Web site. 
7. The PNG </span><span>format was the most recently developed popular graphic format. </span>
7 0
3 years ago
Read 2 more answers
In powerpoint a point is _____ of an inch in height.
USPshnik [31]
 a fraction

I think it is correct.

Hopefully it helps.
6 0
3 years ago
In computer science, what does the word security mean?
zepelin [54]

Answer:

B

Explanation:

Computer security, cybersecurity or information technology security (IT security) is the protection of computer systems and networks from information disclosure, theft of or damage to their hardware, software, or electronic data, as well as from the disruption or misdirection of the services they provide.[1]

4 0
2 years ago
Other questions:
  • What does Verizon child allow parents to do? My parents recently got the app and put it on my phone so I was wondering...
    11·1 answer
  • What do you think about net neutrality??
    6·2 answers
  • 7. The penalties for a first-time DUI charge include a fine of __________. A. up to $500 for a BAL of .08 to .15 B. $500-$1,000
    5·1 answer
  • What is the film format that many filmmakers feel is superior to any other format?
    13·1 answer
  • What to do when you strip a screw
    10·2 answers
  • Refer to the exhibit. The PC is connected to the console port of the switch. All the other connections are made through FastEthe
    6·1 answer
  • Find the basic period and basic frequency of the function g(t)=8cos(10πt)+sin(15πt)
    9·1 answer
  • Some Tiny College staff employees are information technology (IT) personnel.
    8·1 answer
  • What is a file and where can we make use of a file?​
    14·1 answer
  • A small square at the right corner of the table is what?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!