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
Pepsi [2]
3 years ago
6

Given that note, write a program which tells us the major scale starting at that note, using the pattern above. In the main bloc

k: Use a while loop to continue to ask for notes and then call a function get_scale. In the function get_scale, output the scale using the list. A hint is that you can encode the number of steps as a separate list of offsets. (Since a major scale will always have the same offs
Computers and Technology
1 answer:
White raven [17]3 years ago
5 0

<u>Solution and Explanation:</u>

the_notes = ['C','C#','D','D#','E','F','F#','G','G#','A','A#','B'] #original list

def get_scale(choice): #function to get the major diatonic scale

steps=[1,1,.5,1,1,1,.5] #separate list for steps

size=None

for i in range(0,12): #loop to find out the index of the note entered

if(the_notes[i]==choice):

size =i

break

new_notes=the_notes[size:] + the_notes[:size]

#the above statement rotate the list so that the entered note can become the first note in the new list(i.e new notes)

index =0 #

scale="" #a string to store the major diatonic scale

for i in range(0,7):

scale+=new_notes[index]+" "

if(steps[i]==1):

index = index+2

else:

index=index+1

return scale

#main block

while(1):

choice=input("What scale do you want or Q to quit? ")

if(choice=='Q'):

break

elif(choice in the_notes):

print(get_scale(choice))

else:

print("That is not a note")

You might be interested in
You can align controls in the report design window using the align button on the report design tools ____ tab.
Iteru [2.4K]
<span>You can align controls in the report design window using the align button on the report design tools arrange tab.</span> This tab is used to apply different types of formatting to reports in Access. The user<span> can change one type of control layout to another,  can remove controls from layouts so that she/he can position the controls wherever you want on the report.</span>
4 0
3 years ago
______ devices are high-performance storage servers that are individually connected to a network to provide storage for the comp
natali 33 [55]
NAS - network attached storage
3 0
4 years ago
A Python data model defining the state of a game for Tic-Tac-Toe. You must fully describe the notion of a state of the game, lim
Artist 52 [7]

Answer:

Check the explanation

Explanation:

Here in this game of Tic-Tac-Toe, it is using the TPGE engine which is a Tiny Python Game Engine. Let's talk about its functions like:-

def image_type(img): In this function, it is simply taking image as a parameter and returning its object type like DISC if the image is in graphical form, TEXT if it is a string, and LINE if it is other than the mentioned object.

def convert_image(img):  In this function, it is simply taking image as a parameter and returning an equivalent graphical object as understood by John Zelle's. Mainly comparing for three things in this function and those are: if image equals to DISC then it is calling convert_circle(function), if image equals to LINE then it is calling convert_line(function), and if image equals to TEXT then it is calling convert_text(function),

def convert_circle(x): This function takes a list( a group of values) and makes a circle at the center of the window and the circle's radius is coming from the list.

convert_text, convert_line, convert_circle are only creating text, line, and circle and then returning it.

def graphical_elements(images): This function is taking image as a parameter and then extracting shape and color from the image and then calling convert_image(shape) and convert_type(shape) and it gives us graphic and kind respectively. Now it is checking whether kind equals to DISC If yes then filling color on the window else, setting the outline of the window

def run(): Here it is finally running the game with required parameters, the whole game is continously running under the while loop.

That's all

8 0
4 years ago
Which electronic community allows you to write a message and send it to several people at the same time?
Fynjy0 [20]
Email would be the answer youre looking for.Hope this helps!!
7 0
4 years ago
Read 2 more answers
Which routine is configured to execute first when the program runs?
tester [92]
It's D because of ok
4 0
3 years ago
Other questions:
  • What are some ways social media networks make money from users
    10·1 answer
  • Which of the following file formats is used for art work
    11·1 answer
  • Write a program that finds the largest in a series of numbers entered by the user.The program must prompt the user to enter numb
    12·1 answer
  • Match the part of the browser window to the correct description.
    9·1 answer
  • Carbon copy others who are..
    14·2 answers
  • What was the best Metal Gear Solid you enjoyed the most?​
    6·1 answer
  • Which 2 conditions must be met in order to use receipt forwarding in QuickBooks Online?
    11·1 answer
  • Select the correct text in the passage.
    15·1 answer
  • Which statement about analog and digital images is true?.
    15·1 answer
  • Which statements are TRUE about web services protocols? (Select TWO responses) SOAP and REST are both web service communication
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!