Question: This is language SWIFT, here is the question: Please use ibm swift sandbox to check it before posting it!! Thank you!!! Save All Functions!!! Write

This is language SWIFT, here is the question: This is language SWIFT, here is the question: Please use ibm swift

Please use ibm swift sandbox to check it before posting it!! Thank you!!!

Save All Functions!!! Write and test the following functions: //Given a Dictionary of grades, return an Array of the names of the students who 7 Thave a grade that is greater than or equal to a given grade. //This array should be sorted. une studentsWithGreaterGrade (grades: tstring, Int], compareGrade: Int)-Istring] Hint: To sort an array from lowest to highest use the sort function. For example if names was an variable array of Strings, then names.sort () would put names in alphabetical order //Given an array of Doubles, return the sum of all the numbers in the array func sum (values: [Double])->Double //Given an array of Doubles, find the mean (average) of all the elements in the array func mean (values: [Double])-> Double //Given an array of Doubles, find the standard deviation of all the elements in the array une stdev (values: [Double])->Double Standard Deviation Formula: Test Code: e 9rades 0.02, 50.9, 5:0.30.03 an* : 57, "betty: 92, red let grades = ["sam" : 72, "any" : 91, "tom" : 65, "ann" : 57, "betty" : 92, "fred" : 84] print ("sample data array: (values)") print ("sum is.(sum (values))") print ("mean is...(mean (values))") print("") print ("sample grades: \(grades) ") print ("matching students: (studentswithGreaterGrade (gzades, compareGrade: 70))) Expected output: sample data array: [5.0, 10.0, 15.0, 20.0, 25.0, 30.0 sum is. .105.0 mean is...17.5 standard deviation is is...9.35414346693485 sample grades: ["sam": 72, "fred": 84, "amy": 91,m" 65, "ann": 57, "betty": 92) matching students: ("amy", "betty", "red", "sam

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!