Python function to print all time when angle between hour hand and minute


Topic: Python function to print all time when angle between hour hand and minute

Solution

def printTime(theta): 
  
    for hh in range(0, 12): 
        for mm in range(0, 60): 
            if (calcAngle(hh, mm)==theta): 
                print(hh, ":", mm, sep = "") 
                return
              
    print("Input angle not valid.") 
    return



List all Python Programs