0
Can someone guide me through this?
Timmy & Sarah think they are in love, but around where they live, they will only know once they pick a flower each. If one of the flowers has an even number of petals and the other has an odd number of petals it means they are in love. Write a function that will take the number of petals of each flower and return true if they are in love and false if they aren't. Eg. inLove(4, 4) -> false inLove(3,11) -> false
5 odpowiedzi
+ 2
Visit the following links given below:
https://github.com/dj9aj/Codewars-Kata-Solution
https://prosenjs.blogspot.com/2017/04/opposites-attract-code-wars-problem.html?m=1
http://www.puronglong.com/2015/05/14/Mycodewars(3).html
https://www.programmersought.com/article/5408695973/
https://hockeychik99.github.io
Note: Please show your attempts first before posting any questions here at sololearn. For more information, don't forget to go through the Sololearn Community Guidelines.
Hope this helps.
+ 1
Thank you Arobo,but the code you gave is in java, I need codes in Kotlin. Thanks for your effort
+ 1
Convert the given Java code to Kotlin.
Visit the below link:
https://www.google.com/url?sa=t&source=web&rct=j&url=https://programmerworld.co/android/how-to-convert-the-java-code-to-kotlin-for-your-app-in-android-studio/&ved=2ahUKEwjcjpW3wNvxAhXUF4gKHdDMDtEQo7QBegQIBhAB&usg=AOvVaw2OkmTs-q7d0Nz3Hot1pyEV
https://www.google.com/url?sa=t&source=web&rct=j&url=https://discuss.kotlinlang.org/t/convert-javascript-code-to-kotlin-android/19077&ved=2ahUKEwikmPWZwNvxAhWXWX0KHataBPAQFjACegQICBAC&usg=AOvVaw00x0AfoKMGHD7iPDqnXv_o&cshid=1626023352518
https://www.google.com/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/46250613/how-to-convert-js-code-to-kotlin-without-the-new-keyword&ved=2ahUKEwikmPWZwNvxAhWXWX0KHataBPAQFjAEegQIAxAC&usg=AOvVaw0d-dv8GFCtVBrAR0o1lsN4&cshid=1626023352518
Hope this helps.
0
Just use Jvdroid.
It is an app for compiling Java, but can also be used for Kotlin:
https://play.google.com/store/apps/details?id=ru.iiec.jvdroid
Or you can download the pro version :
https://www.happymod.com/jvdroid-ide-for-java-mod/ru.iiec.jvdroid/com.mod.jvdroid-ide-for-java-mod-apk-1-15.html
- 1
I am not with my laptop, I just needed it in kotlin, so I can run it through my solo learn app