qiymat qabul qilsa, b soni a dan kata bo`lishi shart emas.
inOrder(1, 2, 4, false) → true
inOrder(1, 2, 1, false) → false
inOrder(1, 1, 2, true) → true
20.
inOrderEqual
Given three ints, a b c, return true if they are in strict increasing order, such
as 2 5 11, or 5 6 7, but not 6 5 7 or 5 5 7. However, with the exception that
if "equalOk" is true, equality is allowed, such as 5 5 7 or 5 5 5.
Uchta butun a, b, c son berilgan. Agar ular qattiy o`sish tartibida
berilgan bo`lsa true qiymat qaytaring, masalan 2 5 11, yoki 5 6 7,
lekin 6 5 7 yoki 5 5 7 shartni qanoatlantirmaydi. Istisno sifatida agar
“equalOk” true bo`lsa, 5 5 7 yoki 5 5 5 kabi tengliklar o`rinlidir.
inOrderEqual(2, 5, 11, false) → true
inOrderEqual(5, 7, 6, false) → false
inOrderEqual(5, 5, 7, true) → true
21.
lastDigit
Given three ints, a b c, return true if two or more of them have the same
rightmost digit. The ints are non-negative. Note: the % "mod" operator
computes the remainder, e.g. 17 % 10 is 7.
Uchta a, b, c butun son berilgan. Agar ulardan ikkitasining o`ng
qismi bir xil son bilan tugasa true qiymat qaytarilsin.
lastDigit(23, 19, 13) → true
lastDigit(23, 19, 12) → false
lastDigit(23, 19, 3) → true
22.
lessBy10
Given three ints, a b c, return true if one of them is 10 or more less than
one of the others.
Uchta a, b, c butun qiymat berilgan, ulardan biri 10 yoki
boshqalaridan kata bo`lsa true qiymat qaytarilsin.
lessBy10(1, 7, 11) → true
lessBy10(1, 7, 10) → false
lessBy10(11, 1, 7) → true
23.
withoutDoubles
Return the sum of two 6-sided dice rolls, each in the range 1..6. However,
if noDoubles is true, if the two dice show the same value, increment one
die to the next value, wrapping around to 1 if its value was 6.
Dostları ilə paylaş: |