Kotlin Parking Fee Quiz Question | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Kotlin Parking Fee Quiz Question

Please could anyone help me out with the kotlin parking fee quiz. I've done so many different things but it still shows no output. I've run out of ideas :(

27th Feb 2021, 4:13 AM
Fortune Alebiosu
Fortune Alebiosu - avatar
11 Answers
+ 3
changed >= 24.0 -> total = 15 * days + (hours %24) * 0.5 The variable changed is Var changed: Double = hours + 0.0
20th Mar 2021, 10:06 AM
Eashan Morajkar
Eashan Morajkar - avatar
+ 1
How many test cases work
6th Mar 2021, 8:21 AM
Eashan Morajkar
Eashan Morajkar - avatar
+ 1
i can tell you two lines of code if test cases 3 5 and 6 dont work
6th Mar 2021, 8:22 AM
Eashan Morajkar
Eashan Morajkar - avatar
+ 1
You want full code
20th Mar 2021, 10:03 AM
Eashan Morajkar
Eashan Morajkar - avatar
+ 1
All wrong test cases are double then 24 and for EVERY 24 HOUR the fee is 15 $
20th Mar 2021, 10:07 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
Sharique Khan giving answer without explaining and almost without asking for OP code before is bad practice: how will he learn if you do all for him, let him avoiding to think?
27th Feb 2021, 1:34 PM
visph
visph - avatar
0
Eashan Morajkar Just 2 test cases work
20th Mar 2021, 9:23 AM
Fortune Alebiosu
Fortune Alebiosu - avatar
0
Ok
20th Mar 2021, 10:03 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
So if test case is 48 , the anser should be 30.0 and not 27.0
20th Mar 2021, 10:08 AM
Eashan Morajkar
Eashan Morajkar - avatar
0
Thank you I'll try it
23rd Mar 2021, 10:44 AM
Fortune Alebiosu
Fortune Alebiosu - avatar
0
Can you paste your code here so we can have a look?
29th Mar 2022, 1:27 AM
Raed
Raed - avatar