Rewrite Program 100 so that two input values are provided to the function: the sound and a percentage of how far into the sound to go before changing from increasing to decreasing the volume.

What will be an ideal response?


```
def increaseAndDecrease2(sound, percentage):
for sampleIndex in range(0,getLength(sound)*percentage):
value = getSampleValueAt(sound ,sampleIndex)
setSampleValueAt(sound ,sampleIndex ,value * 2)
for sampleIndex in range(getLength(sound)*percentage,getLength(sound)):
value = getSampleValueAt(sound ,sampleIndex)
setSampleValueAt(sound ,sampleIndex ,value * 0.2)
```

Computer Science & Information Technology

You might also like to view...

Answer the following statements true (T) or false (F)

1) The height of a 2-3 tree increases when an element is inserted. 2) Rotation may be used when deleting an element from a 2-3 tree to maintain the balance and properties of a 2-3 tree. 3) A -Tree ensures that each non-root node in the tree is at least 2/3 full. 4) A linked representation of a B-tree is the best way to implement the collection, regardless of the amount of data to be held in the tree. 5) The middle child node of a 3-node in a 2-3 tree has one or two elements whose values are between the values of the elements in the parent node.

Computer Science & Information Technology

________ is a business-centered social network that is designed for business connections

A) Facebook B) Twitter C) LinkedIn D) Yahoo!

Computer Science & Information Technology

Dogpile is a type of spider sent out by search engines

Indicate whether the statement is true or false

Computer Science & Information Technology

A numbered list is also known as an ordered list

Indicate whether the statement is true or false

Computer Science & Information Technology