2.32 LAB: Musical note frequencies 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 by executing cout << fixed << setprecision(2); once before all other cout statements. Ex: If the input is: 440.0 (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

Answers

Answer 1

Answer:

Explanation:

[tex]\text{This is a python code:}[/tex]

[tex]\text{import math}[/tex]

[tex]your {\_} {value 1 }= float(inpu \ t ())[/tex]

[tex]your{\_}value 2 = your{\_}value1*math.exp(1 * math.log(2) / 12)[/tex]

[tex]your{\_}value 3 = your{\_}value1*math.exp(2 * math.log(2) / 12)[/tex]

[tex]your{\_}value 4 = your{\_}value1*math.exp(3 * math.log(2) / 12)[/tex]

[tex]your{\_}value 5 = your{\_}value1*math.exp(4 * math.log(2) / 12)[/tex]

[tex]print('\{:.2f\} \{:.2f\} \{:.2f\} \{:.2f\} \{:.2f\}'.format(your\_value1, \ your\_value2, \ your\_value3,[/tex][tex]\ your\_value4, \ \ your\_value5))[/tex]

[tex]\mathbf{OUTPU \ T :}[/tex]

[tex]\mathbf{440.00 \ 466.16 \ 493.88 \ 523.25 \ 554.37}[/tex]

Answer 2

The code for musical note frequencies On a piano, a key has a frequency, say f0 is in the explanation part below.

Here is a C++ program to the stated problem:

#include <iostream>

#include <iomanip>

#include <cmath>

int main() {

   double frequency;

   std::cout << "Enter the initial key frequency: ";

   std::cin >> frequency;

   std::cout << std::fixed << std::setprecision(2); // Set output precision to 2 decimal places

   std::cout << frequency << " ";

   for (int i = 1; i <= 4; ++i) {

       frequency *= std::pow(2, 1.0 / 12); // Calculate the next frequency

       std::cout << frequency << " ";

   }

   return 0;

}

Thus, in this program, we use the user's original key frequency as input. The starting frequency and the following four higher key frequencies are then calculated and produced using a loop.

For more details regarding C++ program, visit:

https://brainly.com/question/33180199

#SPJ6


Related Questions

bob has 2 candy bars he is fat what hapennes

Answers

Answer:

he eats The candy Bar

Explanation:

I think cause As You told he is fat He might like sugary items

Answer:

It is thought that some people are destined to gain weight because they have inherited “fat genes” from their parents. There can be no doubt that people vary in their genetic makeup and some people are inclined, because of genetic reasons, to become tall, or broad-shouldered, or squat, or fat.

Explanation:

it also has to do that your digest system do not digest it fast enough

"There are no longer mature industries; rather, there are mature ways of doing business," he is referring to the high demand of creativity and innovation in the market

Answers

Hi, you've asked an incomplete and unclear question. However, I provided the full text below.

Explanation:

The text reads;

"When Porter says “There are no longer mature industries; rather, there are mature ways of doing business,” he is referring to the high demand for creativity and innovation in the market. Earlier we used to be more concerned about the hardware and the physical product rather than its information content, But now as a business, we need to provide more informative content with the product.

Like General Electric offers dedicated customer service for its line of goods which differentiates it from its rivals. Similarly, shipping companies like UPS now offer us to track the location of our package on a live map. This is what we call a mature business and how we can differentiate ourselves and stand out in the highly competitive market by using Information and Technology..."

True or false: Machine learning lets computers
learn how to do things they weren't
specifically programmed to do.

Answers

Answer:

True

Explanation:

Who is the father of computer​

Answers

Charles Babbage
Xxxxxxxx

Answer:

Charles Babbage is known as the father of computer.

Explanation:

hope it is helpful to you

Here is the answer to Edhesive 7.5 code practice


def GPAcalc(grade, weight):


grades = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0}


if weight == 0:


return grades[grade]


else:


return grades[grade] + 1


def Main(Random):

Print ("hi")


classes = int(input("How many Classes are you taking? "))


total = 0


for x in range(classes):


letter = input("Enter your Letter Grade: ")


user_weight = int(input("Is it weighted? (1 = yes 0 = no) "))


grade = GPAcalc(letter, user_weight)


total += grade


print("Your GPA score is: ", grade)


print("Your weighted GPA is a",(total/classes))

Answers

oh my god i could never do coding

True or False? Security code is almost always open source!
True
False

Answers

Answer:

its true

Step-by-step explanation:

Security code is almost always open source is a false statement. Check more about  Security code below.

What is security code?

The  Security code  is known to be the number that is known to be found in the front or back of any credit cards. It is made just  for security use.

Conclusively,  Security code is almost always open source as one cannot get it except one is told about it. Therefore, it is not an open source.

Learn more about  Security code from

https://brainly.com/question/26260220

whats wrong with my ps4 i cleaned it and it's still overheating and i have 3 fans for it

Answers

Answer: If your PS4 is overheating, It must be because of some dust you couldn't reach and piled up.

Explanation: What you need to do is take a can of compressed air and gently navigate it through the openings to the fan on your PS4. Go through and clean out the USB ports.

How are switches indirectly involved in ARP poisoning?

Answers

Answer:

They

are indirectly involved in the attack because they do not verify the the MAC/IP address

association

Explanation:

PLEASE MARK ME AS BRAINLIEST

Match the following.
1. the process of reducing repetition of data
data normalization
2. individual categories of data you will enter in a database
records
3. a field that is a unique identifier for each record in the table
fields
4. data that is entered in the database
primary key
5. a link between two tables
relationship

Answers

Answer:

1192783728439

Explanation:

Which of the following is NOT true about a flow chart?
A. It is usually created by programmers after writing a program
B. It shows programmers different algorithms before creating a program
C. It uses boxes of different shapes which indicate different types of
instructions
D. It helps programmers pay attention to the logic of the solution to the
problem

Answers

i think the answer is A

The not true of flow chart.

A flow chart is an illustration that shows the several steps of the process or the sequence if events and is a tool that can be used to adapt a wide variety and describes the purposes of the processes. Is basically a type of diagram representation of an algorithm.

This shows the answer is created for the programmers after a program.

The flow chart is a guide and describes the methodology of completing the task and the various steps involved to solve the same.Hence option A is correct.

Learn more about the flow chart.

brainly.com/question/15712490.

Multiple Select Which conditions make using an array a better choice than a list? Select 3 options. when your list would contain a mixture of numbers and string values when you have a very large quantities of numeric data values when all your data are string when you will do a great deal of arithmetic calculations when efficiency is of great importance

Answers

When you have a very large quantities of numeric data values

When you will do a great deal of arithmetic calculations

When efficiency is of great importance

The conditions that make using an array a better choice than a list are:

When you have very large quantities of numeric data valuesWhen you will do a lot of arithmetic calculationsWhen efficiency is of great importance

What are arrays?

An array is a set of items, images, or numbers arranged in rows and columns. Any set of rows or columns is referred to as an array. Examples of arrays include rows of seats for a recital, rows of cards laid out for the game of Memory, and rows of numbers in an Excel spreadsheet.

It is important to think of an array as a collection of variables of the same type even though it is used to store a collection of data. An array is a group of identically data-typed elements kept in consecutive memory regions.

Therefore, the correct options are B, when you have very large quantities of numeric data values, D, when you will do a lot of arithmetic calculations, and E. When efficiency is of great importance.

To learn more about arrays, refer to the link:

https://brainly.com/question/13107940

#SPJ5

What are some good digital habits?

Answers

Turn off notifications

who like the videos where is clown is from :)

Answers

Answer:

i hate clowns alot especially pennywise lol

Explanation:

One tool under What-If-Analysis is Scenarios. Which best describes the purpose of setting up and using scenarios

1. to quickly combine multiple formulas from different cells into just one
2. to instantly compare results when data in numerous cells change to specified values
3. to conduct automatic complex statistical analysis on a range of cells
4. to constrain some cells to certain values so that the wrong data are rejected if entered​

Answers

Answer:

Option B, to instantly compare results when data in numerous cells change to specified values

Explanation:

Scenario setting with in the What If Analysis is used to compare various scenarios with in the same excel sheet. Scenarios has set of values that are saves and updated automatically as the values with in the cell changes. Also the scenarios can be switched.

Hence, option B is correct

Which is a preformatted file that can be used to standardize the appearance of exported data?
a database
a spreadsheet
a report
a template

Answers

Answer:

D

Explanation:

A preformatted file that can be used to standardize the appearance of exported data is a template. Thus, option D is correct.

What is spreadsheet?

A spreadsheet is a preformatted file that can be used to standardize the appearance of exported data. A spreadsheet is a computer program for organizing, calculating, and storing data in tabular form. Spreadsheets were created as digital counterparts to traditional paper accounting spreadsheets.

The data entered into a table's cells is what the program uses to run. Each cell may include text, numeric data, or formula results that automatically calculate and display values based on the contents of neighbouring cells.

Users of spreadsheets can change any stored value and watch the changes in calculated values. This enables quick investigation of numerous scenarios without the need for manual recalculation, making the spreadsheet helpful for "what-if" study.

Thus, A spreadsheet is a preformatted file that can be used to standardize the appearance of exported data.

Learn more about Spreadsheet, refer to the link:

brainly.com/question/8284022

#SPJ3

is a keyboard a software?

Answers

Answer:

Yes

Explanation:

Because it's apart of software hope this helps

The hardware is all the tangible computer equipment, such as the keyboard and mouse. The software is what makes the hardware work or lets you get things done, such as writing documents with Microsoft Word or playing a Solitaire game.

Is a keyboard a software or hardware?
Computer hardware includes the physical parts of a computer, such as the case, central processing unit (CPU), monitor, mouse, keyboard, computer data storage, graphics card, sound card, speakers and motherboard. By contrast, the software is the set of instructions that can be stored and run by hardware.


Hope it helps, have a great day!❤️✨

future quirk ideas for bnha

Answers

Niceeeeeeeeeeee lololololol
Hello there just a fellow MHA fan :)

How do you write a multiplication formula in excel with an absolute refrence?

Answers

To multiply all the numbers in column A by cell C2, add $ symbols to the cell reference like this: $C$2, which you can see in the example below. Using $ symbols tells Excel that the reference to C2 is “absolute,” so when you copy the formula to another cell, the reference will always be to cell C2.

3.
What is the meaning of *.VBP.

Answers

Answer:

The meaning of VBP is Visual Basic Project

Answer:

visual basic projects thankyouu HAHAHAHA

because cute ako

Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing their progress.

Which Python module should Keira use to draw a line on the screen?

Design Graphics
Graphics Module
Math Module
Turtle Graphics

Answers

Answer:

Design Graphics

Explanation:

HURRY PLEASE ITS A TEST
A military cargo plane is loaded with the maximum weight allowable for the flight. The cargo is heavier than what the pilot usually carries, so the pilot adjusts as follows: Group of answer choices
a. The pilot flies slower to create less thrust and less lift
b. The pilot flies slower to create more thrust and more lift
c. The pilot flies faster to create less thrust and less lift
d. The pilot flies faster to create more thrust and more lift

Answers

A.)

It's either A or D both of them stand out and make sense to me so I think that it'll be right if you choose A or D.

-Ɽ3₮Ɽ0 Ⱬ3Ɽ0

Surrendering to digital distractions can result in a disappointed
feeling of how you spent your time. True false

Answers

It all depends on how the person can handle the situation, some people may say false and others may say true. It depends on who and when you ask.

Jiwoo is a professional photographer. Identify and describe a photography scenario where Jiwoo would need to consider the ethics and aesthetics of photography before proceeding. Clearly examine what ethical and aesthetic consideration she would have based on the scenario that you describe and how these relate to photography as a career or art form in general.

Answers

Answer:

Photography ethics are the principles that guide the way we take and share photos. Why is photography ethic so important? If we don't have morality in the way we use photography, we risk Aesthetics Ethics deals with the rights and wrongs and Aesthetics deals with beauty or otherwise. When we correct, manipulate or enhance images, the factors of ethics and aesthetics must always be kept in consideration. Where Does One Draw The Line if you add or remove something there that wasn’t in the scene you have crossed from documentary to fictional art. Exceptions In other cases, the only way to present a truer representation of reality is through a composite rather than with a single exposure.

Explanation:

I hope this helps I little

I really need help with this question, I can’t fail this please :) tysm

Answers

Answer:

i think its the third one, i hope this helps

Explanation:

Which is the hanging indent on the ruler?



A
B
C
D

Answers

My question needs to put 20 character long but the answer is C

You have a database with three tables: one each for products, suppliers, and distributors. You need to locate the product ID number for hammers and find out who supplies them. Which database component would perform this task?

A. Form
B. Table
C. Report
D. Query

Answers

Answer:

I would say A... But that's just me

Explanation:

Hopefully this helps you :))

Answer:

The answer is C: Query

Explanation: I just did it in Edge 2021. Trust me its right! I hope this helps! :)

A free software license allows users to

Answers

Answer:

C. use, alter, and distribute the software as desired.

Explanation:

A software can be defined as a computer program or application that comprises of sets of code for performing specific tasks on the system

A free software license allows users to use, alter, and distribute the software as desired.

Which of these factors needs to be considered when filming in HD?
The screen is a rectangle.
The screen is a square.
There are no pixels involved.
There will be less definition in each shot.

Answers

Note that the factors that need to be considered when filming in HD is: "

There are no pixels involved. (Option C)There will be fewer definitions in each shot. (Option D)

What is HD Filming?

High-definition video is greater in resolution and quality than standard-definition video. While there is no accepted definition of high-definition, it is commonly defined as any video picture with much more than 480 vertical scan lines or 576 vertical lines.

High Definition video is of greater quality than standard definition video (or Standard Definition). The image will be crisper in HD than in SD.

Note that the screen being a rectangle or square does not need to be considered when filming in HD. However, the presence of pixels and potential loss of definition in each shot are factors that should be considered.

Learn more about filming:
https://brainly.com/question/14824318
#SPJ1

You learned that you can use the tags to insert a link to another webpage. One problem that webpage developers face is that, after a time, links may no longer work. Can you think of ways that you can avoid broken links?

Answers

Answer:Image Control

We can use the height and width properties to control the size of our image. Let’s say we only want the recipe image to take up approximately one-third of the page. Do you remember from math class what percentage one-third is? Type in the following CSS rule, and watch your picture change size before your very eyes!

img {

   height:33%;

   width:33%;

}

That wasn’t too difficult, right? Let’s make the image stand out a bit more by adding a border. Inside the img rule, add the following declarations:

border-style:dashed;

border-width: 5px;

Your picture should now have a dashed border around it that is five pixels in width. Play around with the different border styles that are available. You should see a drop-down box of choices, including dotted, dashed, double, groove, inset, and outset. You can also adjust the width of your border. Using your informative guessing skills, can you predict what property you might use to change the color of the border? Try it and see if you’re right!

Explanation:

 this is a direct quote from my lesson


Which of the following is document content that displays at the top of every page?
Choose the answer.

style set

footer

header

title

Answers

Answer: Header/Title

Explanation:

Other Questions
If the sun were to burn out, it would take humans just over 8 minutes to realize because light from the sun takes just over 8minutes to reach earth. Tommy was 3 years old when his dad showed him a particular star that was estimated to be 18 light yearsaway from earth. If the star burned out immediately after Tommy was showed it, how old would Tommy be before he realized thestar was gone?A)21 years oldB)18 years old9 years oldD)6 years old What is 3(5)(5-2)+2 Please help me 3(x + 2) * 10 * 7 divided by 70 - 2 (x+2)Simplify Can Someone Help With this? I'm not good at Music (the subject). What I'm asking for is listening to the song(s) and answer the question below that song.Here are the songs to answer the questions:1) Dave Brubeck - Take Five2) MGMT - Electric Feel3) Mission: Impossible (Original) Theme Song4) Dave Brubeck - Blue Rondo a la Turk5) Led Zeppelin - The OceanAlso, sorry I couldn't put any links here. Brainly won't let me put links in my question (and it's considered spam unfortunately). Choose the graph of the solution to this inequality. c 12 16 A number line with a closed dot at negative 4 shaded to the right. A number line with a closed dot at 4 shaded to the left. A number line with a closed dot at 4 shaded to the right. A number line with a closed dot at negative 2 shaded to the right. Mr. Jackson has a total of 12 employees. He wants to buy each employee 3 aprons that will cost $7.79 each, 1 cap that will cost $5.68, and a t-shirt that costs $13.99. How much will Mr. Jackson need to spend to purchase the items for his employees? Learning Task 1: Search for 14 words in the puzzle to know the elements andprinciples of arts. You may look on your previous lesson on page 11. Writeyour answer on your notebook. Who here watches anime??!(I sure do lol) Kayla is thinking of a 3-digit number. * It is divisible by 18. * It is a palindrome (It reads the same left-to-right as it does right-to-left, like 252 and 848). * It is one less than a multiple of 5. What is Kaylas number? Which question will best help a student describe a story's resolution?How is the character's problem solved?Where does this story take place?Who assists the main character most?Does the ending leave questions unanswered? Solve for x 8.2/x =12/6.4 What is the variety of gene combinations that exist within a population called? Two angles of a triangle measure 55 and 20 what is the measure of the third angle of the triangle help quick pls ill give a brainliest and 20pts A tree casts a shadow 21m long. The angle of elevation of the sun is 51. What is the height of the tree? Round your answer to the nearest tenth. Write a Simple biography on Andrew Jackson during his time as President? YeS mOrE 9Th GrAdE mAtH (question for smart people) please help i need this Can you write an essay about what makes a good rapper.I will mark you Brainly. PLEASE HELP, i'll mark the brain thingy !