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
In minecraft Education Edition what is the crafting recipe for Balloons and Glow sticks?
schepotkina [342]

Answer

sorry I only know how to make balloons :(

Explanation:

For the balloons the recipe that one is:

- you will need 6 latex

To make latex you will need two different elements one is 5 Carbon and the other one is 8 Hydrogen ( don't use crafting table to do it use the compound creator)

-Dye ( whatever color you want)

-Helium

-lead

Instructions

on the crafting table the latex will go on the sides (3 on the left and 3 on the right). The dye goes on top, the Helium in the middle and the lead at the bottom and there you go a balloon

8 0
3 years ago
Read 2 more answers
Trace the code below to find the two errors.
nasty-shy [4]

Answer:subtotal =.08

Explanation:

8 0
2 years ago
Add three methods to the Student class that compare twoStudent objects. One method (__eq__) should test for equality. A second m
shusha [124]

Answer:

class Student(object):

def __init__(self, name, number):

self.name = name

self.scores = []

for count in range(number):

self.scores.append(0)

 

def getName(self):

 

return self.name

 

def setScore(self, i, score):

 

self.scores[i - 1] = score

 

def getScore(self, i):

 

return self.scores[i - 1]

 

def getAverage(self):

 

return sum(self.scores) / len(self._scores)

 

def getHighScore(self):

 

return max(self.scores)

def __eq__(self,student):

return self.name == student.name

 

def __ge__(self,student):

return self.name == student.name or self.name>student.name

 

def __lt__(self,student):

return self.name<student.name

 

def __str__(self):

return "Name: " + self.name + "\nScores: " + \

" ".join(map(str, self.scores))

 

 

def main():

student = Student("Ken", 5)

print(student)

for i in range(1, 6):

student.setScore(i, 100)

print(student)

 

print("\nSecond student")

student2 = Student("Ken", 5)

print(student2)

 

print("\nThird student")

student3 = Student("Amit", 5)

print(student3)

 

print("\nChecking equal student1 and student 2")

print(student.__eq__(student2))

 

print("\nChecking equal student1 and student 3")

print(student.__eq__(student3))

 

print("\nChecking greater than equal student1 and student 3")

print(student.__ge__(student3))

 

print("\nChecking less than student1 and student 3")

print(student.__lt__(student3))

if __name__ == "__main__":

5 0
3 years ago
Which of the following is an example of how the healthcare industry uses computer programming? (5 points)
IgorC [24]
3-D prosthetics would most likely be the answer, also, don’t copy links it’s most likely not the answer anyways.
5 0
2 years ago
Remote authentication has always been a concern because the person is coming from a public network, and many companies require t
g100num [7]

Answer:

Incomplete Question.

I'll answer this question based on general terms

Explanation:

Two Factor Authentication, abbreviated as 2FA.

It is a type of authentication that requires the presentation of two credentials for access to personal data and information.

The credentials needed for a 2FA are

1. Either of the following; PIN, Password or Pattern

2. Your device or gadget which could be an ATM Card, Mobile Phone

3. Biometrics such as fingerprint, voice input

Number one is often referred to as "Something you know"

Number two is referred to as "Something you have"

Number three is referred to as "Something you are"

The 2FA doesn't require the three aforementioned credentials. It only needs just two of the credentials to provide its authentication.

8 0
3 years ago
Read 2 more answers
Other questions:
  • A storyboard is an example of an implementation tool.<br><br> A.<br> True<br><br> B.<br> False
    8·2 answers
  • Can Someone give me a 5 paragraph essay about all of the uses in Microsoft Word.
    9·1 answer
  • According to Newton's Second Law of Motion, when an object is acted on by an unbalanced force, how will that object respond?
    11·1 answer
  • What setting in Word keeps single lines of a new
    15·1 answer
  • Why is removing presentation-oriented markup from one's html document considered to be a best practice?
    14·1 answer
  • RFID tags uses memory that is read-only.A. TrueB. False
    5·1 answer
  • Suppose you have one particular application that is trying to send data on the Internet but none of the data is making it to the
    15·2 answers
  • Which steps are needed for word to create an index
    5·1 answer
  • How do I write a good personal narrative pls help im struggling very hard rn.​
    15·1 answer
  • a cloud access security broker (casb) provides protection across 4 areas/pillars: visibility to detect all cloud services, data
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!