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
Should a waiting thread receive priority over a thread first attempting to enter a monitor? What priority scheme, if any, should
nadezda [96]

Answer:

Yes, thread should have a priority level. Threads are scheduled to run based on their scheduling priority. Each thread is assigned a scheduling priority. The priority levels range from zero (lowest priority) to 31.

Explanation:

Threads generally are given different kinds of priorities based on the types of work the threads will be used for. This is normally known as scheduling and it is a vital procedure in thread prioritization. The standard priority levels for every thread is from the lowest priority which is typically '0' and the highest priority which is approximately 31.

6 0
3 years ago
How can I master the computer organization ​
inn [45]

Answer:

This course qualitatively and quantitatively examines computer design trade-offs, teaches the fundamentals of computer architecture and organization, including CPU, memory, registers, arithmetic unit, control unit, and input/output components.

Explanation:

it can be difficult. For me it was one of the most challenging classes but also one of the my most interesting ones. You gain an understanding of what occurs at 7 different layers of abstraction (similar in theory to the OSI model used in networking but different). It can be hard

7 0
2 years ago
Which is a benefit of a stock photo agency?
Burka [1]

A stock photography agency is essentially a middleman between you as a photographer and the licensors of your work. Typically, the agency takes a commission from each sale. For photographers, working with a stock agency can help get your work in front of new audiences, expanding your profile and opening new revenue streams.

4 0
3 years ago
Read 2 more answers
Users on the networks connected to the R1 router report that they are unable to contact computers connected to the R3 router. Tr
melisa1 [442]

Answer:

On R3, run OSPF for area 0 on Fa0/0

On R3, run OSPF for area 0 on Fa0/1

Then,

On R3, run OSPF for area 0 on serial0/1/0.

Explanation:

Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. You then use a link state routing (LSR) algorithm and falls into the group of interior gateway protocols (IGPs), operating within a single autonomous system (AS).

3 0
3 years ago
What is the rarest gun on surviv io
IgorC [24]

Answer: It's the M249

Explanation: I wanna get brainliest XD

3 0
3 years ago
Read 2 more answers
Other questions:
  • Omar’s teacher has asked him to send her a PDF copy of his presentation via email.
    11·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • Is Windows a:<br><br> A.operating system<br> B.software<br> C.hardware<br> D.input device
    12·1 answer
  • QUESTION 8 Software applications that generate information are located in the first tier of n-tier architectures. True False
    7·1 answer
  • What specific tool allows you to create GPOs, view a GPO's settings, link and unlink GPOs with containers, and manage the inheri
    10·1 answer
  • Ask the user to enter 3 scores each representing an assignment score. Ask the user for their midterm and final exam. Store all a
    11·1 answer
  • Create a program that calculates the tip and total for a meal at a restaurant. Type the code into an IDLE IDE editor window and
    5·1 answer
  • What is the purpose of this parallelogram shape in a flowchart?
    15·1 answer
  • Open excel program then use the (IF) function to fill the column of (Expensive/Cheap) then save your
    9·1 answer
  • What kind of software consists of programs designed to make users more productive and/or assist them with personal tasks?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!