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
Freya realizes she does not have enough in her bank account to use the debit card. She decides to use a credit card instead. Whi
zheka24 [161]
Please mark this topic under 'Business'.

All of these are viable thoughts when getting a credit card, but only some can be applied to her situation.

1, 2, 4, and 5 are what Freya may ask herself. A loan doesn't seem nessecary, as she can get only further in debt.

If you found this especially helpful, I'd appreciate if you'd vote me Brainliest for your answer. I want to be able to assist more users one-on-one, as well as to move up in rank! :)
7 0
3 years ago
Read 2 more answers
What are some programs that you have used that have condition-controlled loops and count-controlled loops?
gladu [14]

Some programs that we have used that have condition-controlled loops and count-controlled loops due to the following reasons.

Explanation:

Condition-controlled loops

A program could be made more intelligent by programming it to avoid hazards. For example, if the robot vehicle is 3 cm from the edge of the table and you tell it to move forwards 5 cm, it will drive off the edge of the table. To stop this from happening, you might write a condition-controlled loop like this:

move forward

repeat until (touching table edge)  

Condition-controlled loops can be used to add a high degree of intelligence to a computer system.

Count Controlled Loops

A count controlled loop is a repetition  structure that iterates a specific number of  times

You can write a count controlled loop using a

while() loop.

For example:

counter = 0

while counter < 5:

print (“This will print 5

times”)

counter += 1

8 0
3 years ago
The__ key is used to group or identify a field or record within a table. (you don't need it).
SVEN [57.7K]

Answer:

B.

Explanation:

6 0
3 years ago
Read 2 more answers
Most hand sewing begins and ends with
Burka [1]
I would say it has to be b but its what the correct answer is its up to you!

I hoped this helped you out!

Have a nice day!

4 0
3 years ago
Using an LCD projector to show an online video to a group of people is an example of:
stich3 [128]

Answer:

Analog to digital conversation.

Explanation:

A lcd projector is used to play images, videos and ducoments on a computer system to a broadened view. It sends electronical signals to pixels on the lcd lens to to give output.

Watching a video online is wireless and requires an electromagnetic wave, which is analog in nature, to communicate.

The streaming of online video through a lcd projector is an analog to digital conversation.

4 0
3 years ago
Other questions:
  • How can you find Web pages that contain news published during the past week?
    8·1 answer
  • What is industry 4.0 -automation revolution-, what is your opinion about the direction this revolution is taking the industry in
    8·1 answer
  • The posterior auditory stream terminates in the ________ and is involved in ________.
    12·1 answer
  • An IT company revises its process parameters in response to complaints from vendors that products were not ready on time. This w
    15·1 answer
  • What is the different between ethical and legal issues?​
    6·1 answer
  • A coffee shop is considering accepting orders and payments through their phone app and have decided to use public key encryption
    10·1 answer
  • What type of photography is represented by a photograph of a dog on a beach ?
    11·1 answer
  • ¡Hola! He visto en muchos comentarios de Twitter "svd" cuando alguien dice "dale fav a este Tweet y siganse entre ustedes" y en
    8·1 answer
  • How do people decide their ethical behavior
    13·2 answers
  • Write a short note on Ms - Excel...​..
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!