City | Country | Latitude | Longitude |
---|---|---|---|
Accra | Ghana | 5.6037 | -0.1870 |
var city; city = City.1fromNameCountryLatLong( "Accra", "Ghana", 5.6037, -0.1870); println(city.2toString()); println("Northern Hemisphere: " + city.3isInNorthernHemisphere());
Label | Dimension 1 | Dimension 2 |
---|---|---|
Gymnasium Roof | 400 | 200 |
Auditorium Roof | 300 | 310 |
let gym, auditorium; gym = Rectangle.1fromWidthHeight(400, 200); gym.2setLabel('Gymnasium Roof');3println(gym.toString()); auditorium = Rectangle.fromWidthHeight(300, 310); auditorium.setLabel('Auditorium Roof'); println(auditorium.toString());
let cities = City.1newSampleSet1(); for (let nextCity of cities) println(nextCity.2toString());
Given: | ||
---|---|---|
Location Description | Latitude | Longitude |
NHCC | 45.1 | -93.4 |
Meteor Landing | 45.3 | -93.2 |
//d for distance let meteor, nhcc, d, safetyThreshold; meteor = GeoLocation.1fromLatLong(45.1, -93.4); nhcc = GeoLocation.2fromLatLong(45.3, -93.2); d = ToolLib.3latLongDistFromTo(meteor, nhcc); println('Distance to Meteor (miles): ' + d); safetyThreshold = 20; if (4d <= safetyThreshold) println('Student should wear hard hat'); else println('Student does not need hard hat');