import Cocoa //boolean let goodDogs = true let gameOver = false let isMultiple = 120.isMultiple(of:3) var isAuthenticated = false isAuthenticated = !isAuthenticated //toggle函数:is the same as using the exclamation mark for not just in slightly less code but is surprisingly useful when dealing with complex numbers var game = false game.toggle() //join strings together //one way: join them using plus (operator overloading); this way is wasteful let firstPart = "Hello, " let secondPart = "World!" let geeting = firstPart + secondPart let geetingForPeople = geeting + " Girls and boys!" //another way: a special technique called string interpolation //you can't add integers to string with plus but string interpolation can let name = "Taylor" let age = 26 let message = "Hello, my name is \(name) and I'm \(age) years old." //checkpoint 1 let tem = 10 let fahrenheit = (tem * 9)/5 + 32 print("celsius is \(tem) and fahrenheit is \(fahrenheit)")