Code:
import Foundation
import Glibc
//Declaring and initialising Array
var Temperatures :[Double] = [20 ,30 ,10 , 50 ,-20 ,5
,362,2,43];
//Declaring and initialising threshold
var threshold : Double = 10;
//Declaring and initialising Count
var count: Int = 0;
for temp in Temperatures
{
if temp>threshold
{
// Incrementing count
count=count+1;
}
}
print(count);
Code Screenshot:
Output:
write your code in swift as a proctored test, using Lockdown Browser, and must be taken...
Using Swift playground and / or the command line for macOS (open Xcode, create a new Xcode project, macOS, command line tool), practice the following exercises: Exercise: Swift Variables Declare 2 variables/constants with some random values and any name of your choice Considering these 2 variables, one as a value of PI and other as a radius of circle, find the area of circle Print the area of circle Declare a string variable explicitly with value “Northeastern”. Declare a string...