def x = 15
def y = 4
println "Toplama: ${x + y}" // Çıktı: Toplama: 19
println "Çıkarma: ${x - y}" // Çıktı: Çıkarma: 11
println "Çarpma: ${x * y}" // Çıktı: Çarpma: 60
println "Bölme: ${x / y}" // Çıktı: Bölme: 3.75
println "Modül: ${x % y}" // Çıktı: Modül: 3
println "Üs: ${x ** 2}" // Çıktı: Üs: 225
def a = 25
def b = 10
println a == b // Çıktı: false
println a != b // Çıktı: true
println a > b // Çıktı: true
println a <= b // Çıktı: false
def hasPermission = true
def isLoggedIn = false
println hasPermission && isLoggedIn // Çıktı: false
println hasPermission || isLoggedIn // Çıktı: true
println !isLoggedIn // Çıktı: true
def value = 20
value += 10 // value = 30
value *= 2 // value = 60
value /= 4 // value = 15
println value // Çıktı: 15
def x = 6 // Binary: 0110
def y = 3 // Binary: 0011
println x & y // Çıktı: 2 (0010)
println x | y // Çıktı: 7 (0111)
println x ^ y // Çıktı: 5 (0101)
println x << 1 // Çıktı: 12 (1100)
def username = null
def length = username?.length() // Hata fırlatmaz, null döner
println length // Çıktı: null
def displayName = username ?: "Ziyaretçi"
println displayName // Çıktı: Ziyaretçi
def numbers = [1, 2, 3]
def doubled = numbers*.multiply(2) // Her elemanı 2 ile çarpar
println doubled // Çıktı: [2, 4, 6]
def range = 1..5
println range // Çıktı: [1, 2, 3, 4, 5]