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]
3 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]3 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
Which of the following SQL statements will display all customers who have not recently placed an order? a. SELECT customer# FROM
JulsSmile [24]

Answer:

The correct option is option 4 from the options indicated below:

Explanation:

The options are as given below

1-SELECT customer# FROM customers

UNION

SELECT customer# FROM orders;

2-SELECT customer# FROM orders

MINUS

SELECT customer# FROM customers;

3-SELECT customer# FROM orders

INTERSECT

SELECT customer# FROM customers;

4-SELECT customer# FROM customers

MINUS

SELECT customer# FROM orders;

Option 1 is not correct as it will provide the list of all the customers whether they have placed order or not.

Option 2 is not correct as it will provide the list of customers who have placed order but are not in the customers table. This will return the empty records.

Option 3 is not correct as it will provide the list of customers who have placed the order.

Option 4 is correct as it will provide the list of customers from the CUSTOMERS table which are not in the Orders table. thus the list of customers who have not placed the order yet.

3 0
3 years ago
assume an int array, candy, stores the number of candy bars sold by a group of children wherecandy[j] is the number of candy bar
GuDViN [60]

Answer:

The first one. Important notice sum should be equal to zero before calculating the total sum.

5 0
3 years ago
Read 2 more answers
Jesse purchases a new smartphone and is immediately able to use it to send a photo over the Internet to a friend who lives in a
frez [133]

Answer:

D: A single direct connection is established between any two devices connected to the Internet.

Explanation:

The internet is a complex network system made of protocols, packets, and other things. For a network to be connected, it requires the use of multiple pathways. It is unnecessary for a single direct connection because of most of the networks in this real-world travel in multiple direct connections. For example, if you want to go to Brainly.com. It first needs your IP address and then the protocols like HTTP and TCP to send it. Networks are just like traffic. If one section or a part gets blocked, they go on a different path and reach their destination. It is the same here for networks. Networks go into multiple directions to get to their destination. Therefore, a single direct connection is not required or necessary to make it possible.  

8 0
3 years ago
Biography of bill gates
Juliette [100K]

Answer:

Bill Gates is a technologist, business pioneer, and altruist. He experienced childhood in Seattle, Washington, with a stunning and steady family who empowered his enthusiasm for PCs at an early age. He dropped out of school to begin Microsoft with his beloved companion Paul Allen. He wedded Melinda French in 1994 and they have three kids. Today, Bill and Melinda Gates co-seat the beneficent establishment bearing their names and are cooperating to give their riches back to society.  

Bill experienced childhood in Seattle with his two sisters. His father, William H. Doors II, is a Seattle lawyer and one of the co-seats of the Bill and Melinda Gates Foundation. His late mother, Mary Gates, was a teacher, University of Washington official, and executive of United Way International.

Explanation:

This is just a short biography and not a full one.

5 0
3 years ago
Read 2 more answers
Multiple Choice
anygoal [31]

Answer:

cyptographically

Explanation:

Did this question and got it right. Good luck!

6 0
2 years ago
Other questions:
  • 50+ POINTS AND BRAIN IF CORRECT Chris is working with other employees on a worksheet. The other employees have made comments, bu
    8·1 answer
  • Que funcion tiene la sombrilla forrada de aluminio​
    6·1 answer
  • A user wants to make sure he can quickly restore his computer after a drive failure to the state it was in when Windows and all
    9·1 answer
  • HELP PLEASE!!! I do online school, someone is in another state wanting to help me. No not do my work for me but view what I view
    6·1 answer
  • You are trying to log in to your old computer, and can't remember the password. You sit for hours making random guesses... I'm s
    10·1 answer
  • En que se diferencia el software y el hardware
    7·2 answers
  • We have constructed a Player Class for you. Add the following: public static variable: int totalPlayers Static variable should b
    8·1 answer
  • According to Chargaff's data, ________ must pair with ________, and ________ must pair with ________.
    8·1 answer
  • ravi met few peoples in a party and was mixing up well those wearing expensives clothing and fair complexion . which factors are
    9·1 answer
  • a developer manages an application that interacts with amazon rds. after observing slow performance with read queries, the devel
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!