subject
Computers and Technology, 12.05.2021 22:30 1tzM3

On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance (number of keys) from that key, and r is 2(1/12). Given an initial key frequency, output that frequency and the next 4 higher key frequencies. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('{:.2f} {:.2f} {:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3, your_value4, your_value5))

Ex: If the input is: 440

(which is the A key near the middle of a piano keyboard)

the output is: 440.00 466.16 493.88 523.25 554.37

Note: Use one statement to computer = 2(1/12) using the pow function (remember to import the math module). Then use that r in subsequent statements that use the formula fn = f0 * rn with n being 1, 2, 3, and finally 4.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Is a type of bullying that takes place when a person intentionally posts negative information about another person that is not true.
Answers: 2
question
Computers and Technology, 25.06.2019 08:30
While using pert (program evaluation review technique) and cpm (critical path method) techniques, activities that are not on the critical path are more inflexible than those activities on the critical path. select one: true false
Answers: 1
You know the right answer?
On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 *...
Questions
question
Social Studies, 25.07.2020 01:01
Questions on the website: 13722362