The first one (Center of gravity)
Answer:
See attachment for flowchart
Explanation:
The flowchart is as follows:
Step1: Start
This begins the flowchart
Step 2: Input Score1, Score2, Score3
This gets user input for the three subjects
Step 3: Average = (Score1 + Score2 + Score3)/3
This calculates the average of the three subjects
Step 4: Print Average
This displays the calculated average
Step 5: Stop
This signals the end of the flowchart
Answer:
Explanation:
The following code is written in Python and it is a very simple function/program that takes in an array of strings as a parameter called names. This array is then passed the built-in sort function which automatically sorts it in ascending alphabetical order. Finally, the print method is called on the names array to print all of its elements out.
def sort_strings(names):
names.sort()
print(names)