7 kyu

Time Degrees

275 of 497user3879542

Description:

Note : Issues Fixed with python 2.7.6 , Use any one you like :D , ( Thanks to

Time , time , time . Your task is to write a function that will return the degrees on a analog clock from a digital time that is passed in as parameter . The digital time is type string and will be in the format 00:00 . You also need to return the degrees on the analog clock in type string and format 360:360 . Remember to round of the degrees . Remeber the basic time rules and format like 24:00 = 00:00 and 12:60 = 13:00 . Create your own validation that should return "Check your time !" in any case the time is incorrect or the format is wrong , remember this includes passing in negatives times like "-01:-10".

A few examples :
clock_degree("00:00") will return : "360:360"
clock_degree("01:01") will return : "30:6"
clock_degree("00:01") will return : "360:6"
clock_degree("01:00") will return : "30:360"
clock_degree("01:30") will return : "30:180"
clock_degree("24:00") will return : "Check your time !"
clock_degree("13:60") will return : "Check your time !"
clock_degree("20:34") will return : "240:204"

Remember that discrete hour hand movement is required - snapping to each hour position and also coterminal angles are not allowed. Goodluck and Enjoy !

Fundamentals

Stats:

CreatedJul 10, 2016
PublishedJul 10, 2016
Warriors Trained913
Total Skips12
Total Code Submissions2061
Total Times Completed497
Python Completions275
JavaScript Completions172
C# Completions79
Total Stars10
% of votes with a positive feedback rating85% of 158
Total "Very Satisfied" Votes122
Total "Somewhat Satisfied" Votes24
Total "Not Satisfied" Votes12
Total Rank Assessments19
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user3879542 Avatar
  • GiacomoSorbi Avatar
  • donaldsebleung Avatar
  • user5036852 Avatar
  • hobovsky Avatar
Ad