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

Conversation

zhongqi2016
Copy link

No description provided.

@kotlin-polytech-bot
Copy link

624623296@qq.com

maven

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building kfirst 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[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
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson1/task1/Simple.kt: (105, 76) Type mismatch: inferred type is Int but Double was expected
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson1/task1/Simple.kt: (105, 84) The integer literal does not conform to the expected type Double
[ERROR] /var/lib/jenkins/workspace/kotlin-as-first.fall-2016/src/lesson1/task1/Simple.kt: (113, 39) Unresolved reference: numbers
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.906 s
[INFO] Finished at: 2016-09-22T22:15:24+03:00
[INFO] Final Memory: 38M/237M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.0.3:compile (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

@mglukhikh
Copy link
Contributor

Ваша программа не компилируется. Решив какие-либо задания, обязательно проверяйте их на тестовых функциях -- так, как написано здесь: https://github.com/Kotlin-Polytech/KotlinAsFirst2016/blob/master/tutorial/chapter01.adoc#Упражнения

* Например, 100 рублей под 10% годовых превратятся в 133.1 рубля
*/
fun accountInThreeYears(initial: Int, percent: Int): Double = TODO()
fun accountInThreeYears(initial: Int, percent: Int): Double = (initial*pow(percent,3))
Copy link
Contributor

Choose a reason for hiding this comment

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

Оба аргумента функции pow должны иметь тип Double. У вас они имеют тип Int. Кроме этого, формула в принципе неверна. Например, для суммы в 100 рублей под 2% годовых вы получите с её помощью итог 800 рублей.

Copy link
Author

Choose a reason for hiding this comment

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

Понятно, Спасибо большое

*Необходимо вывести число, полученное из заданного перестановкой цифр в обратном порядке (например, 874).
*/
fun numberRevert(number: Int): Int = TODO()
fun numberRevert(number: Int): Int = (numbers/100+number/10%10+number%10*100)
Copy link
Contributor

Choose a reason for hiding this comment

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

Имя numbers не определено

@mglukhikh
Copy link
Contributor

Вы до сих пор не прислали мне письмо с вашим настоящим именем, фамилией, номером группы и логином на GitHub. Пожалуйста, сделайте это, мой e-mail glukhikh@mail.ru

@kotlin-polytech-bot
Copy link

624623296@qq.com

author

hehe134 [624623296@qq.com]

624623296@qq.com

lesson1.task1

Author: hehe134 [624623296@qq.com]

Owner: hehe134 [624623296@qq.com]

Total: 10 / 12

Example: 4 / 4
Trivial: 4 / 4
Easy: 2 / 4

Succeeded:

  • [Trivial] lesson1.task1/seconds
  • [Example] lesson1.task1/sqRoot
  • [Easy] lesson1.task1/thirdDigit
  • [Trivial] lesson1.task1/lengthInMeters
  • [Example] lesson1.task1/sqr
  • [Example] lesson1.task1/discriminant
  • [Example] lesson1.task1/quadraticRootProduct
  • [Trivial] lesson1.task1/trackLength
  • [Trivial] lesson1.task1/angleInRadian
  • [Easy] lesson1.task1/accountInThreeYears

Failed:

  • [Easy] lesson1.task1/travelMinutes
    • org.opentest4j.AssertionFailedError : expected: <216> but was: <39>
  • [Easy] lesson1.task1/travelMinutes
    • Expected: 367
    • Actual: 72
    • Inputs:
      • hoursDepart -> 1
      • minutesArrive -> 8
      • hoursArrive -> 7
    • Exception: null
  • [Easy] lesson1.task1/numberRevert
    • org.opentest4j.AssertionFailedError : expected: <874> but was: <811>
  • [Easy] lesson1.task1/numberRevert
    • Expected: 749
    • Actual: 713
    • Inputs:
      • number -> 947
    • Exception: null

Seed: 1823990364213401937

624623296@qq.com

owner

hehe134 [624623296@qq.com]

@mglukhikh
Copy link
Contributor

Поищите ошибки в travelMinutes и numberRevert. В отчёте бота выше содержатся примеры, на которых ваша функция работает неправильно (к примеру, переворачивая число 947, вы получаете результат 713 вместо 749).

* Вывести значение того же угла в радианах (например, 0.63256).
*/
fun angleInRadian(grad: Int, min: Int, sec: Int): Double = TODO()
fun angleInRadian(grad: Int, min: Int, sec: Int): Double =(grad/180.0*PI+min/60.0/180*PI+sec/3600.0/180*PI)
Copy link
Contributor

Choose a reason for hiding this comment

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

Старайтесь ставить больше пробелов, такая строка плохо читается. Используйте Ctrl+Alt+L для автоматического форматирования кода в IDEA.

@kotlin-polytech-bot
Copy link

624623296@qq.com

author

hehe134 [624623296@qq.com]

624623296@qq.com

lesson1.task1

Author: hehe134 [624623296@qq.com]

Owner: hehe134 [624623296@qq.com]

Total: 12 / 12

Example: 4 / 4
Trivial: 4 / 4
Easy: 4 / 4

Succeeded:

  • [Trivial] lesson1.task1/seconds
  • [Trivial] lesson1.task1/trackLength
  • [Easy] lesson1.task1/travelMinutes
  • [Easy] lesson1.task1/thirdDigit
  • [Example] lesson1.task1/sqRoot
  • [Easy] lesson1.task1/accountInThreeYears
  • [Example] lesson1.task1/discriminant
  • [Example] lesson1.task1/sqr
  • [Trivial] lesson1.task1/lengthInMeters
  • [Trivial] lesson1.task1/angleInRadian
  • [Example] lesson1.task1/quadraticRootProduct
  • [Easy] lesson1.task1/numberRevert

Seed: -4230738481497432600

624623296@qq.com

owner

hehe134 [624623296@qq.com]

@mglukhikh
Copy link
Contributor

Сейчас всё решено верно.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants