+ 32
[challenge] Sololearn clock
The Sololearn clock strikes - The hours at full hour --> three times at 3pm - one time at a quarter past - two times at half - 3 times at s quarter to Given two times from user eg 17:33 and 23:14 - how many times does clock strike within that time interval? input is included 14:00 15:30 : 2+1+2+3+3+1+2 if first input is higher value, the second one is next day. Have fun!
26 Answers
+ 17
@Oma
Please clarify what output is for midnight? 0 or 12 strikes? Thank you 😊
+ 10
@Oma
Hahaha...yes, you have right 😉
+ 8
@Oma Folk you have very good range of Algorithms based Challenges.
Why Don't you make them Assignment.
What's your Opinion about Assignment and Answer it Here.
https://www.sololearn.com/discuss/1082512/?ref=app
+ 8
https://code.sololearn.com/cbpdatq30Uq7/?ref=app
+ 7
@Oma I think you should post some assignments too in the lesson factory.
+ 7
@Lukar 12 times. Otherwise people pass ghost hour (-:
+ 6
Nice challenge :)
+ 6
@Vishal sounds good!
+ 5
My attempt :)
https://code.sololearn.com/Wy11FCn2RvJU/?ref=app
+ 5
https://www.sololearn.com/discuss/1082512/?ref=app
+ 5
me also?!
+ 4
oma let others think...
u directly posted an ans...
zero patience...
+ 4
Mine, no modules:
https://code.sololearn.com/c3s0SvGjPQ0R/#py
+ 3
@Maxim clear rule
2 ,
2:15,
2:30
2:45
3:00
+ 2
+ 1
It's quite easy if you work with minutes instead of hour:minute format, great challenge!
https://code.sololearn.com/c2E1P5kGGNnS/?ref=app
+ 1
Well, just a clumsy attempt working around numpy ranges
https://code.sololearn.com/cHtAF3121LrY/?ref=app