Skip to content
This repository was archived by the owner on Sep 6, 2018. It is now read-only.

Conversation

milkyway23
Copy link

No description provided.

@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson2.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 7 / 7

Example: 1 / 1
Easy: 5 / 5
Normal: 1 / 1

Succeeded:

  • [Example] lesson2.task1/minBiRoot
  • [Easy] lesson2.task1/ageDescription
  • [Easy] lesson2.task1/whichRookThreatens
  • [Easy] lesson2.task1/timeForHalfWay
  • [Easy] lesson2.task1/triangleKind
  • [Normal] lesson2.task1/segmentLength
  • [Easy] lesson2.task1/rookOrBishopThreatens

Seed: -3905744759704403537

lesson2.task2

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 4 / 5

Example: 1 / 1
Easy: 2 / 2
Normal: 1 / 2

Succeeded:

  • [Example] lesson2.task2/pointInsideCircle
  • [Easy] lesson2.task2/isNumberHappy
  • [Easy] lesson2.task2/queenThreatens
  • [Normal] lesson2.task2/circleInside

Failed:

  • [Normal] lesson2.task2/brickPasses
    • Expected:
      false
    • Actual:
      true
    • Inputs:
      • a ->
        1
      • b ->
        649
      • c ->
        873
      • r ->
        298
      • s ->
        126
    • Exception: null

Seed: -3905744759704403537

owner

milkyway23 []

Copy link
Contributor

@mglukhikh mglukhikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Много мелких замечаний по стилю + одна задача решена неверно. Исправляйте, пожалуйста.

*/
fun ageDescription(age: Int): String = TODO()
fun ageDescription(age: Int): String {
if ( ( age in 5..20 ) or ( age in 105..120 ) ) return "$age лет"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше вместо неленивого or использовать ленивый ||. В данном случае особой разницы нет, но во многих случаях это критически важно

t2: Double, v2: Double,
t3: Double, v3: Double): Double = TODO()
t3: Double, v3: Double): Double {
val p:Double =t1*v1+t2*v2+v3*t3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тип локальных переменных обычно выводится автоматически. Кроме этого, рекомендуется расставлять пробелы в единообразном стиле: val p = t1 * v1 + t2 * v2 + t3 * v3. Такой стиль можно получить автоматически, использовав комбинацию клавиш Ctrl+Alt+L в IDEA

rookX2: Int, rookY2: Int): Int = TODO()

rookX2: Int, rookY2: Int): Int {
var rook:Int=0; var bishop:Int=0; var p:Int=0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Определение нескольких переменных в одной строке выглядит очень некрасиво

rookX2: Int, rookY2: Int): Int {
var rook:Int=0; var bishop:Int=0; var p:Int=0
if ((rookX1==kingX)or(rookY1==kingY)) rook = 1
if ((rookX2==kingX)or(rookY2==kingY)) bishop = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or --> ||. Обе переменные rook, bishop следует сделать логическими, так как они обозначают наличие угрозы от ладьи (слона). Угроза или есть, или её нет.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вы, судя по всему, скопировали текст этой функции с последующей, в которой действительно есть ладья и слон. Здесь же есть две ладьи, поэтому переменные следовало назвать rook1 и rook2.

if ((rook==0)&&(bishop==0)) p=0 else
if ((rook==1)&&(bishop==1)) p=3 else
if (bishop==1) p=2 else
p=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подобную конструкцию следует оформлять так:

if (!rook && !bishop) p = 0
else if (rook && bishop) p = 3
else if (bishop) p = 2
else p = 1

или с помощью when:

when {
    !rook && !bishop -> p = 0
    rook && bishop -> p = 3
    bishop -> p = 2
    else -> p = 1
}

И не забывайте расставлять пробелы правильно (Ctrl+Alt+L)

if (c<=a && d>=b) n = (b - a) else
if (c<=a && d>=a && d<=b) n = (d-a) else
if (c>=a && c<=b && d>=b) n = (b-c) else
if (c>=a && c<=b && d<=b) n = (d-c) else n = -1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправить выравнивание if..else if (см. пример выше), пробелы

fun isNumberHappy(number: Int): Boolean = TODO()

fun isNumberHappy(number: Int): Boolean {
if ((number % 10 + number / 10 % 10) == (number / 100 % 10 + number / 1000)) return true else return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (x) return true else return false эквивалентно return x.

fun queenThreatens(x1: Int, y1: Int, x2: Int, y2: Int): Boolean {
if ((x1 == x2) || (y2 == y1)) return true
else if (Math.abs(x1 - x2) == Math.abs(y1 - y2)) return true
else return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (x) return true else if (y) return true else return false эквивалентно return x || y.


x2: Double, y2: Double, r2: Double): Boolean {
if ((Math.sqrt(sqr(x2 - x1) + sqr(y2 - y1)) + r1) <= r2) return true
else return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (x) return true else return false

*/
fun brickPasses(a: Int, b: Int, c: Int, r: Int, s: Int): Boolean = TODO()
fun brickPasses(a: Int, b: Int, c: Int, r: Int, s: Int): Boolean {
if (((a <= r) && (b <= s)) || ((a <= s) && (b <= r)) || ((a <= r) && (c <= s)) || ((a <= s) && (a <= r)) || ((c <= r) && (b <= s)) || ((c <= s) && (b <= r))) return true else return false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эта очень длинная строка. В ней довольно просто ошибиться, что вы и сделали (см. сообщение бота). Добавьте в тестовую функцию тот случай, который привёл для вас бот. А эту функцию попробуйте записать короче. Используйте тот факт, что кирпич в любом случае следует вставлять самой длинной стороной вдоль отверстия, то есть, самая длинная сторона кирпича должна игнорироваться при сравнении

@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson2.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 7 / 7

Example: 1 / 1
Easy: 5 / 5
Normal: 1 / 1

Succeeded:

  • [Example] lesson2.task1/minBiRoot
  • [Easy] lesson2.task1/rookOrBishopThreatens
  • [Easy] lesson2.task1/timeForHalfWay
  • [Easy] lesson2.task1/ageDescription
  • [Easy] lesson2.task1/whichRookThreatens
  • [Easy] lesson2.task1/triangleKind
  • [Normal] lesson2.task1/segmentLength

Seed: 8819397182519864960

lesson2.task2

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 5 / 5

Example: 1 / 1
Easy: 2 / 2
Normal: 2 / 2

Succeeded:

  • [Example] lesson2.task2/pointInsideCircle
  • [Easy] lesson2.task2/isNumberHappy
  • [Easy] lesson2.task2/queenThreatens
  • [Normal] lesson2.task2/circleInside
  • [Normal] lesson2.task2/brickPasses

Seed: 8819397182519864960

owner

milkyway23 []

@milkyway23 milkyway23 changed the title kotlin бацилла kotlin Oct 26, 2016
@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson3.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 10 / 18

Example: 4 / 4
Trivial: 1 / 1
Easy: 3 / 8
Normal: 2 / 3
Hard: 0 / 2

Succeeded:

  • [Example] lesson3.task1/factorial
  • [Example] lesson3.task1/isPerfect
  • [Easy] lesson3.task1/minDivisor
  • [Example] lesson3.task1/isPrime
  • [Easy] lesson3.task1/lcm
  • [Easy] lesson3.task1/fib
  • [Normal] lesson3.task1/revert
  • [Trivial] lesson3.task1/digitNumber
  • [Normal] lesson3.task1/isPalindrome
  • [Example] lesson3.task1/digitCountInNumber

Seed: 2797484711808635803

owner

milkyway23 []

@milkyway23 milkyway23 changed the title бацилла kotlin бацилла kotlin 2, 3 Oct 26, 2016
@milkyway23 milkyway23 changed the title бацилла kotlin 2, 3 бацилла kotlin 2(fixed), 3 Oct 26, 2016
@mglukhikh
Copy link
Contributor

Название Pull Request не соответствует его содержанию. Будьте любезны его исправить

Copy link
Contributor

@mglukhikh mglukhikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправьте, пожалуйста, приведённые ниже замечания

rookX2: Int, rookY2: Int): Int = TODO()

rookX2: Int, rookY2: Int): Int {
var rook: Int = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val rook1 = rookX1 == kingX || rookY1 == kingY. Раз речь идёт о 1-й ладье, то и назвать переменную нужно rook1, а не просто rook. Кроме этого, у этой переменной может быть всего два значения: есть угроза или нет. А значит, она должна быть логической, а не целой. То же самое со 2-й ладьёй.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

var p: Int = 0
if ((rookX1 == kingX) || (rookY1 == kingY)) rook = 1
if ((rookX2 == kingX) || (rookY2 == kingY)) rook1 = 1
if ((rook == 0) && (rook1 == 0)) p = 0 else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подобные многоэтажные проверки лучше записывать через when. Заодно, с форматированием кода будет проще -- сейчас это читать невозможно

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

bishopX: Int, bishopY: Int): Int = TODO()

bishopX: Int, bishopY: Int): Int {
var rook = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

См. замечания к предыдущей функции

fun triangleKind(a: Double, b: Double, c: Double): Int {
var n: Int = 0
if ((a + b > c) && (a + c > b) && (c + b > a)) {
if ((a * a + b * b < c * c) || (a * a + c * c < b * b) || (b * b + c * c < a * a)) n = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь тоже лучше использовать when или, по крайней мере, написать все три проверки на одном уровне, а не лестницей.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

fun segmentLength(a: Int, b: Int, c: Int, d: Int): Int = TODO()
fun segmentLength(a: Int, b: Int, c: Int, d: Int): Int {
var n: Int = 0
if (c <= a && d >= b) n = (b - a)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

См. замечания к предыдущей функции

*/
fun isNumberHappy(number: Int): Boolean = TODO()
fun isNumberHappy(number: Int): Boolean {
return ((number % 10 + number / 10 % 10) == (number / 100 % 10 + number / 1000))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для этой функции можно использовать expression body: fun isNumberHappy(number: Int): Boolean = и далее выражение, которое у вас стоит после return.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

var n2 = n
if (n == 0) return 1
else while (n2 != 0) {
n2 = n2 / 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше n2 /= 10

fun minDivisor(n: Int): Int {
var a = n
for (i in 2..n) {
if (n % i == 0) if (i <= a) a = i
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поскольку вы перебираете возможные делители по возрастанию, вы можете сразу же вернуть делитель из функции, когда убедились, что n делится на него без остатка. Промежуточная переменная a здесь не нужна.

* 15751 -- палиндром, 3653 -- нет.
*/
fun isPalindrome(n: Int): Boolean = TODO()
fun isPalindrome(n: Int): Boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эта функция практически повторяет предыдущую, попробуйте выразить isPalindrome через revert

@milkyway23 milkyway23 changed the title бацилла kotlin 2(fixed), 3 kotlin 2(fixed), 3 Oct 27, 2016
@milkyway23
Copy link
Author

А пока я не исправлю замечания, урок не будет учитываться при промежуточной аттестации?

@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson3.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 14 / 18

Example: 4 / 4
Trivial: 1 / 1
Easy: 4 / 8
Normal: 3 / 3
Hard: 2 / 2

Succeeded:

  • [Easy] lesson3.task1/fib
  • [Example] lesson3.task1/factorial
  • [Easy] lesson3.task1/minDivisor
  • [Normal] lesson3.task1/isPalindrome
  • [Easy] lesson3.task1/lcm
  • [Trivial] lesson3.task1/digitNumber
  • [Example] lesson3.task1/isPrime
  • [Example] lesson3.task1/isPerfect
  • [Easy] lesson3.task1/maxDivisor
  • [Normal] lesson3.task1/revert
  • [Example] lesson3.task1/digitCountInNumber
  • [Normal] lesson3.task1/hasDifferentDigits
  • [Hard] lesson3.task1/squareSequenceDigit
  • [Hard] lesson3.task1/fibSequenceDigit

Failed:

  • [Easy] lesson3.task1/sin
    • Expected:
      0.017452406459518247
    • Actual:
      0.017452403253134147
    • Inputs:
      • x ->
        -18.832102629018816
      • eps ->
        1.0000022204460493E-10
    • Exception: null
  • [Easy] lesson3.task1/cos
    • Expected:
      1.0
    • Actual:
      0.9999999992088325
    • Inputs:
      • x ->
        -18.84955592153876
      • eps ->
        1.0E-10
    • Exception: null

Seed: 3870592699220730581

owner

milkyway23 []

@kotlin-polytech-bot
Copy link

maven

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building kfirst 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://jitpack.io/com/github/belyaev-mikhail/kcheck/master-SNAPSHOT/maven-metadata.xml
398/398 B

Downloaded: https://jitpack.io/com/github/belyaev-mikhail/kcheck/master-SNAPSHOT/maven-metadata.xml (398 B at 0.5 KB/sec)
Downloading: https://jitpack.io/com/github/belyaev-mikhail/kotlin-quasi-reflection/master-SNAPSHOT/maven-metadata.xml
407/407 B

Downloaded: https://jitpack.io/com/github/belyaev-mikhail/kotlin-quasi-reflection/master-SNAPSHOT/maven-metadata.xml (407 B at 0.8 KB/sec)
[INFO]
[INFO] --- kotlin-maven-plugin:1.0.3:compile (compile) @ kfirst ---
[INFO] Kotlin Compiler version 1.0.3
[INFO] Compiling Kotlin sources from [/var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src]
[INFO] Module name is kfirst
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (74, 18) Variable 'p' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (113, 18) Variable 'n' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (131, 18) Variable 'n' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (81, 13) Variable 'c' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (97, 15) Variable 'nod' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (98, 15) Variable 'nok' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (265, 18) Variable 'resalt' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (271, 10) Name shadowed: i
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (287, 18) Variable 'resalt' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (293, 10) Name shadowed: i
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson4/task1/List.kt: (169, 9) Variable 'i' is never used
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson4/task1/List.kt: (171, 10) Name shadowed: i
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ kfirst ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ kfirst ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- kotlin-maven-plugin:1.0.3:compile (compile) @ kfirst ---
[INFO] Kotlin Compiler version 1.0.3
[WARNING] Source root doesn't exist: /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/target/generated-sources/annotations
[INFO] Compiling Kotlin sources from [/var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src]
[INFO] Module name is kfirst
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (74, 18) Variable 'p' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (113, 18) Variable 'n' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson2/task1/IfElse.kt: (131, 18) Variable 'n' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (81, 13) Variable 'c' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (97, 15) Variable 'nod' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (98, 15) Variable 'nok' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (265, 18) Variable 'resalt' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (271, 10) Name shadowed: i
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (287, 18) Variable 'resalt' initializer is redundant
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson3/task1/Loop.kt: (293, 10) Name shadowed: i
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson4/task1/List.kt: (169, 9) Variable 'i' is never used
[WARNING] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson4/task1/List.kt: (171, 10) Name shadowed: i
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ kfirst ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ kfirst ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- kotlin-maven-plugin:1.0.3:test-compile (test-compile) @ kfirst ---
[INFO] Kotlin Compiler version 1.0.3
[INFO] Compiling Kotlin sources from [/var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test]
[INFO] Module name is kfirst
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/RandomTests.kt: (376, 88) Type mismatch: inferred type is Unit but Double was expected
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/RandomTests.kt: (376, 96) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.RandomTests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/RandomTests.kt: (376, 99) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.RandomTests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (126, 9) None of the following functions can be called with the arguments supplied:
public final fun assertEquals(expected: Any!, actual: Any!, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Byte, actual: Byte, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Char, actual: Char, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Double, actual: Double, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, delta: Double): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Float, actual: Float, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, delta: Float): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Int, actual: Int, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Long, actual: Long, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Short, actual: Short, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, message: String!): Unit defined in org.junit.jupiter.api.Assertions
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (126, 35) Type inference failed: Not enough information to infer parameter T in inline fun listOf(): List
Please specify it explicitly.

[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (126, 35) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (126, 45) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (127, 9) None of the following functions can be called with the arguments supplied:
public final fun assertEquals(expected: Any!, actual: Any!, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Byte, actual: Byte, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Char, actual: Char, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Double, actual: Double, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, delta: Double): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Float, actual: Float, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, delta: Float): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Int, actual: Int, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Long, actual: Long, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Short, actual: Short, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, message: String!): Unit defined in org.junit.jupiter.api.Assertions
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (127, 36) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (127, 50) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (128, 9) None of the following functions can be called with the arguments supplied:
public final fun assertEquals(expected: Any!, actual: Any!, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Byte, actual: Byte, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Char, actual: Char, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Double, actual: Double, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, delta: Double): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Float, actual: Float, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, delta: Float): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Int, actual: Int, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Long, actual: Long, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Short, actual: Short, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, message: String!): Unit defined in org.junit.jupiter.api.Assertions
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (128, 36) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (128, 54) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (129, 9) None of the following functions can be called with the arguments supplied:
public final fun assertEquals(expected: Any!, actual: Any!, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Byte, actual: Byte, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Char, actual: Char, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Double, actual: Double, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, delta: Double): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Float, actual: Float, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, delta: Float): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Int, actual: Int, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Long, actual: Long, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Short, actual: Short, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, message: String!): Unit defined in org.junit.jupiter.api.Assertions
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (129, 35) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (129, 59) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (130, 9) None of the following functions can be called with the arguments supplied:
public final fun assertEquals(expected: Any!, actual: Any!, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Any!, actual: Any!, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Byte, actual: Byte, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Byte, actual: Byte, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Char, actual: Char, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Char, actual: Char, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Double, actual: Double, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, delta: Double): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Double, actual: Double, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Float, actual: Float, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, delta: Float): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Float, actual: Float, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Int, actual: Int, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Int, actual: Int, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Long, actual: Long, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Long, actual: Long, message: String!): Unit defined in org.junit.jupiter.api.Assertions
public final fun assertEquals(expected: Short, actual: Short, messageSupplier: (() -> String!)!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, messageSupplier: Supplier<String!>!): Unit defined in org.junit.jupiter.api.Assertions
public open fun assertEquals(expected: Short, actual: Short, message: String!): Unit defined in org.junit.jupiter.api.Assertions
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (130, 36) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/test/lesson4/task1/Tests.kt: (130, 71) Too many arguments for @test @tag public final fun polynom(): Unit defined in lesson4.task1.Tests
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.056 s
[INFO] Finished at: 2016-10-28T20:16:17+03:00
[INFO] Final Memory: 94M/417M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.0.3:test-compile (test-compile) on project kfirst: Compilation error. See log for more details -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson4.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 11 / 21

Example: 7 / 7
Easy: 2 / 2
Normal: 2 / 7
Hard: 0 / 4
Impossible: 0 / 1

Succeeded:

  • [Example] lesson4.task1/invertPositives
  • [Easy] lesson4.task1/mean
  • [Example] lesson4.task1/buildSumExample
  • [Example] lesson4.task1/squares
  • [Normal] lesson4.task1/center
  • [Example] lesson4.task1/biRoots
  • [Normal] lesson4.task1/times
  • [Example] lesson4.task1/sqRoots
  • [Example] lesson4.task1/negativeList
  • [Example] lesson4.task1/isPalindrome
  • [Easy] lesson4.task1/abs

Seed: -7567457683177422940

owner

milkyway23 []

@milkyway23 milkyway23 changed the title kotlin 2(fixed), 3 kotlin 2(fixed), 3, 4 Oct 28, 2016
@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson4.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 11 / 21

Example: 7 / 7
Easy: 2 / 2
Normal: 2 / 7
Hard: 0 / 4
Impossible: 0 / 1

Succeeded:

  • [Example] lesson4.task1/invertPositives
  • [Normal] lesson4.task1/center
  • [Example] lesson4.task1/sqRoots
  • [Easy] lesson4.task1/mean
  • [Example] lesson4.task1/negativeList
  • [Example] lesson4.task1/squares
  • [Example] lesson4.task1/biRoots
  • [Example] lesson4.task1/buildSumExample
  • [Example] lesson4.task1/isPalindrome
  • [Normal] lesson4.task1/times
  • [Easy] lesson4.task1/abs

Seed: -1786036863822967648

owner

milkyway23 []

@mglukhikh mglukhikh added checkme and removed checkme labels Nov 3, 2016
Copy link
Contributor

@mglukhikh mglukhikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Довольно много замечаний к урокам 2, 3 и 4. Прошу их исправить, перед тем как решать следующие уроки.

rookX2: Int, rookY2: Int): Int = TODO()

rookX2: Int, rookY2: Int): Int {
var rook: Int = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

var p: Int = 0
if ((rookX1 == kingX) || (rookY1 == kingY)) rook = 1
if ((rookX2 == kingX) || (rookY2 == kingY)) rook1 = 1
if ((rook == 0) && (rook1 == 0)) p = 0 else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

fun triangleKind(a: Double, b: Double, c: Double): Int {
var n: Int = 0
if ((a + b > c) && (a + c > b) && (c + b > a)) {
if ((a * a + b * b < c * c) || (a * a + c * c < b * b) || (b * b + c * c < a * a)) n = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

*/
fun isNumberHappy(number: Int): Boolean = TODO()
fun isNumberHappy(number: Int): Boolean {
return ((number % 10 + number / 10 % 10) == (number / 100 % 10 + number / 1000))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это замечание всё ещё в силе

fun isPalindrome(n: Int): Boolean = TODO()
fun isPalindrome(n: Int): Boolean {
var a = revert(n)
return (a == n)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Переменная a здесь не нужна. А вместо return для такой простой функции следует использовать expression body: fun isPalindrome(...): Boolean = ....

fun abs(v: List<Double>): Double = TODO()
fun abs(v: List<Double>): Double {
val n: Int = v.size
var length: Double = 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В котлине почти никогда не нужно указывать тип локальных переменных -- он очевиден из контекста.

var length: Double = 0.0
for (i: Int in 0..n - 1) {
length = length + v[i] * v[i]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь лучше использовать for-each: for (elem in v) { ... }, перебирая все элементы вектора. Индексация может быть довольно медленной операцией, да и лишняя переменная появляется

var length: Double = 0.0
for (i: Int in 0..n - 1) {
length = length + list[i]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно просто val length = list.sum().

fun times(a: List<Double>, b: List<Double>): Double {
return if (a.size != b.size) Double.NaN
else if (a.isEmpty() || b.isEmpty()) 0.0
else a.zip(b, { elementOfa, elementOfb -> elementOfa * elementOfb }).sum()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поясните мне в комментарии, что происходит в этой строчке, пожалуйста

if (i % 2 == 1) si = si - number
else si = si + number

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В этой функции (и для косинуса тоже) у вас возникают проблемы с точностью для больших значений x. Попробуйте написать тест для вычисления sin(100 * Math.PI), точность задайте 1e-10, ожидаемый результат равен 0. Из-за того, что вам потребуется просуммировать очень большое количество членов ряда, нужной точности достигнуть вам не удастся. Подумайте, как решить эту проблему, используя хорошо известные математические свойства синуса.

@mglukhikh
Copy link
Contributor

Вы довольно сильно отстаёте от графика. Вам следует продолжать решать задачи учебного проекта.

@milkyway23
Copy link
Author

Извините, просто давно не отсылала из-за неполадок с интернетом(

Отправлено с iPad

23 нояб. 2016 г., в 13:29, Mikhail Glukhikh notifications@github.com написал(а):

Вы довольно сильно отстаёте от графика. Вам следует продолжать решать задачи учебного проекта.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@mglukhikh
Copy link
Contributor

А на упражнения ходить что мешает?

@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson2.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 7 / 7

Example: 1 / 1
Easy: 5 / 5
Normal: 1 / 1

Succeeded:

  • [Easy] lesson2.task1/ageDescription
  • [Easy] lesson2.task1/whichRookThreatens
  • [Easy] lesson2.task1/timeForHalfWay
  • [Example] lesson2.task1/minBiRoot
  • [Easy] lesson2.task1/rookOrBishopThreatens
  • [Easy] lesson2.task1/triangleKind
  • [Normal] lesson2.task1/segmentLength

Seed: -5342678992742420004

lesson2.task2

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 5 / 5

Example: 1 / 1
Easy: 2 / 2
Normal: 2 / 2

Succeeded:

  • [Example] lesson2.task2/pointInsideCircle
  • [Easy] lesson2.task2/isNumberHappy
  • [Easy] lesson2.task2/queenThreatens
  • [Normal] lesson2.task2/circleInside
  • [Normal] lesson2.task2/brickPasses

Seed: -5342678992742420004

lesson3.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 14 / 18

Example: 4 / 4
Trivial: 1 / 1
Easy: 4 / 8
Normal: 3 / 3
Hard: 2 / 2

Succeeded:

  • [Easy] lesson3.task1/fib
  • [Easy] lesson3.task1/lcm
  • [Easy] lesson3.task1/minDivisor
  • [Easy] lesson3.task1/maxDivisor
  • [Normal] lesson3.task1/revert
  • [Normal] lesson3.task1/isPalindrome
  • [Normal] lesson3.task1/hasDifferentDigits
  • [Hard] lesson3.task1/squareSequenceDigit
  • [Hard] lesson3.task1/fibSequenceDigit
  • [Example] lesson3.task1/isPerfect
  • [Example] lesson3.task1/digitCountInNumber
  • [Trivial] lesson3.task1/digitNumber
  • [Example] lesson3.task1/factorial
  • [Example] lesson3.task1/isPrime

Failed:

  • [Easy] lesson3.task1/sin
    • Expected:
      0.017452406459518247
    • Actual:
      0.017452403253134147
    • Inputs:
      • x ->
        -18.832102629018816
      • eps ->
        1.0E-10
    • Exception: null
  • [Easy] lesson3.task1/cos
    • Expected:
      0.9998476951604843
    • Actual:
      0.9998476963145383
    • Inputs:
      • x ->
        -18.832102629018816
      • eps ->
        1.0E-10
    • Exception: null

Seed: -5342678992742420004

lesson4.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 11 / 21

Example: 7 / 7
Easy: 2 / 2
Normal: 2 / 7
Hard: 0 / 4
Impossible: 0 / 1

Succeeded:

  • [Example] lesson4.task1/isPalindrome
  • [Example] lesson4.task1/sqRoots
  • [Example] lesson4.task1/biRoots
  • [Example] lesson4.task1/negativeList
  • [Example] lesson4.task1/invertPositives
  • [Example] lesson4.task1/squares
  • [Example] lesson4.task1/buildSumExample
  • [Easy] lesson4.task1/mean
  • [Normal] lesson4.task1/center
  • [Normal] lesson4.task1/times
  • [Easy] lesson4.task1/abs

Seed: -5342678992742420004

owner

milkyway23 []

total

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 37 / 51

Example: 13 / 13
Trivial: 1 / 1
Easy: 13 / 17
Normal: 8 / 13
Hard: 2 / 6
Impossible: 0 / 1

@milkyway23
Copy link
Author

milkyway23 commented Nov 24, 2016 via email

@mglukhikh
Copy link
Contributor

Я пока ещё не очень сильно ругаюсь :)

@mglukhikh mglukhikh added checkme and removed stale labels Nov 25, 2016
some tasks
@kotlin-polytech-bot
Copy link

author

Елизавета [mokryienot@icloud.com]

lesson5.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 5 / 12

Example: 2 / 2
Normal: 2 / 3
Hard: 1 / 7

Succeeded:

  • [Normal] lesson5.task1/dateStrToDigit
  • [Example] lesson5.task1/timeStrToSeconds
  • [Example] lesson5.task1/timeSecondsToStr
  • [Normal] lesson5.task1/dateDigitToStr
  • [Hard] lesson5.task1/flattenPhoneNumber

Seed: 8461624710135959556

lesson6.task1

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 7 / 16

Example: 4 / 4
Trivial: 1 / 1
Easy: 2 / 2
Normal: 0 / 6
Hard: 0 / 1
Impossible: 0 / 2

Succeeded:

  • [Example] lesson6.task1/halfPerimeter
  • [Easy] lesson6.task1/circleByDiameter
  • [Easy] lesson6.task1/circleDistance
  • [Example] lesson6.task1/pointDistance
  • [Trivial] lesson6.task1/circleContains
  • [Example] lesson6.task1/triangleContains
  • [Example] lesson6.task1/triangleArea

Seed: 8461624710135959556

lesson6.task2

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 2 / 11

Example: 1 / 1
Easy: 1 / 4
Normal: 0 / 2
Hard: 0 / 3
Impossible: 0 / 1

Succeeded:

  • [Easy] lesson6.task2/notation
  • [Example] lesson6.task2/inside

Seed: 8461624710135959556

owner

milkyway23 []

total

Author: Елизавета [mokryienot@icloud.com]

Owner: milkyway23 []

Total: 14 / 39

Example: 7 / 7
Trivial: 1 / 1
Easy: 3 / 6
Normal: 2 / 11
Hard: 1 / 11
Impossible: 0 / 3

@mglukhikh mglukhikh removed the checkme label Nov 25, 2016
@mglukhikh
Copy link
Contributor

А исправить все замечания к урокам 2-4? Посмотрите, пожалуйста, замечания и вопросы на вкладке Files Changed: https://github.com/Kotlin-Polytech/KotlinAsFirst2016/pull/174/files. Потом буду смотреть остальное.

@mglukhikh mglukhikh added the stale label Dec 6, 2016
@mglukhikh
Copy link
Contributor

"Зачёт" готов поставить только после исправления ВСЕХ замечаний.

@mglukhikh mglukhikh added the FAIL label Dec 19, 2016
@mglukhikh
Copy link
Contributor

Замечания вы можете найти на вкладке Files Changed

@mglukhikh mglukhikh closed this Jul 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants