Program - python function to print all time when angle between hour hand and minute


Topic: Program - 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
theta = 90.0
printTime(theta)



List all Python Programs