Write a function to set values that are greater than 0 to the maximum positive value (32,767) in a sound, but leave all the negative values the same. Can you still understand any words in the sound?

What will be an ideal response?


```
def allPositiveMax(fileName):
sound = makeSound(fileName)
for sample in getSamples(sound):
value = getSampleValue(sample)
if (value>0):
setSampleValue(sample ,32767)
play(sound)
```

While the sound is now exceptionally grainy, the words are all clearly understandable.

Note: One could pass in a sound or a filename for this question. The important part is checking whether a value is positive and doing a specific operation based on that.

Computer Science & Information Technology

You might also like to view...

You can set the ____________________ alignment of contents in a cell to adjust the contents to align at the top, middle, or bottom of a cell.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Amanda, an Eighth grader, is learning to use Microsoft Office 2016 applications. She does not know the different ways to copy objects from a document. Amanda should use the _____ to find information about copying objects.?

A. ?Get Information button B. ?Quick Access Toolbar C. ?References and Footnotes tab D. ?Tell me what you want to do box

Computer Science & Information Technology

____ is a technology where high-capacity file storage is directly connected to the network.

A. NAS B. SAN C. MAS D. NAD

Computer Science & Information Technology

List the five fundamental principles of HIPAA.

What will be an ideal response?

Computer Science & Information Technology