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
Temka [501]
4 years ago
10

On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * r^n, 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. Ex: If the input is 440 (the A key near the middle of a piano keyboard), the output is: 440.0 466.1637615180899 493.8833012561241 523.2511306011974 554.3652619537442 Note: Use one statement to compute r = 2^(1/12) using the RaiseToPower() function. Then use that r in subsequent statements that use the formula fn = f0 * r^n with n being 1, 2, 3, and finally 4.
Computers and Technology
1 answer:
vodomira [7]4 years ago
6 0

Answer:

Following are the code to this question:

import math# import math module

def RaiseToPower():   # defining a function RaiseToPower

   r= math.pow(2,1/12)    # defining r variable that calcualte the decimal point value.

   return r # return r variable value.

f0= float(input()) #defining f0 variable that hold input frequency .

for n in range(0,5):#defining for loop to count all frequency

   fn = f * math.pow(RaiseToPower(),n)    # defining fn variable that calls method RaiseToPower and multiply the value by frequency

   print(fn,end=' ')    # use print method to prints all five frequency

Output:

440

440.0 466.1637615180899 493.8833012561241 523.2511306011974 554.3652619537443

Explanation:

Description of the above python code can be defined as follows:

  • In the above code first we import the package of the math module for converting frequency, after importing package a "RaiseToPower" method is declared, inside the method r variable is declared, that counts decimal value and return its value.
  • In the next step, "f0" a frequency variable is declared that input a value from the user and defined a for loop to in the loop fn variable declared, calls the method and pass its input value and stores its decimal points and at the last print its value.

You might be interested in
Wider channel bandwidth ________. increases transmission speed allows more channels to be used in a service band both increases
sattari [20]

Wider channel bandwidth decreases transmission speed.

<h3>What is Wider channel bandwidth?</h3>

Wider WiFi channel widths is known to be a bandwidth that is made up  of 40 MHz and 80 MHz width.

They are known to be used often in the 5 GHz frequency band. In this type pf band, there are said to have a lot of WiFi channels and also less overlapping channels and as such, Wider channel bandwidth decreases transmission speed.

Learn more about bandwidth  from

brainly.com/question/4294318

7 0
2 years ago
Please help me with computing!
Sladkaya [172]

Answer:

ok i help

Explanation:

3 0
3 years ago
While designing a website, a(n) ____ allows you to identify the specific amount of space used on a particular page before it con
Aleks [24]
The answer would be A: wireframe, im pretty sure...

Hope this helped!! :)

8 0
3 years ago
Read 2 more answers
Role playing games have an objective of trying to gain the most points in a certain period of time.
VashaNatasha [74]

Answer: I think False.

8 0
2 years ago
Read 2 more answers
VLSI is the process of creating an integrated circuit (IC) by combing thousands of transistors into a single chip. There are two
stepan [7]

Answer:

Explanation:

An FPGA is a field programmable gate array. It could be "programmed" to do certain task, but don't mistake it with a microprocessor. When programming an FPGA, you're actually changing it's physical structure, the logic gates inside the FPGA, to do the task for you. Therefore, unlike a microprocessor which has to run through a series of command, an FPGA could be rewired to run at a much faster and more efficient rate.

FPGA is good for testbenching and are budget friendly since they can be reprogrammed over and over again in case you messed up. However, they can be quite big and bulky, so they are not suitable for mass production.

ASIC in the other hand can be compact to a small size. ASIC are pretty much the IC chips that you use, like your Intel CPU or LM7000 series chips. However, the process of making them that small is irreversible, so if you messed up, you gotta throw away the whole batch. This make them expensive to make, but their small size and production process allows them to be made in bulk.

Both FPGA and ASIC are good for power consumption and speed because you're actually designing their physical circuit layout, so if your design is efficient then the product will be efficient in both speed and power as well.

In Summary, you design and test your circuit using an FPGA first. Then you send that design to a production company and they will use that design to mass produce it as a small chip.

5 0
4 years ago
Other questions:
  • In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
    5·1 answer
  • All of the following are good reasons to attend a cummunity college except
    10·2 answers
  • All employees of E.C. Hoxy are required to pass through a gate and present their photo identification cards to the guard before
    10·1 answer
  • The Windows ____ window allows you to create the graphical user interface for your application.
    9·1 answer
  • __________ has become a widely accepted evaluation standard for training and education related to the security of information sy
    5·1 answer
  • The _________ contains approximately 200 million axons.
    13·2 answers
  • Which of the following is considered a white collar crime?
    13·1 answer
  • When visiting a museum Liam takes a photo of a painting with a smartphone which stores to image file. Which of the folllowing be
    8·1 answer
  • 3.4 lesson practice quiz edhesive
    11·1 answer
  • Computers are used because they :
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!