Loading...

The Clock Angle

A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.

Domain
Python
Difficulty
easy
Seniority
junior, mid

Problem

A scheduling dashboard renders an analog clock widget. Write a function called clock_angle that takes an hour (1-12) and a minute (0-59) and returns the smaller angle in degrees between the hour and minute hands.

Practice This Problem

Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.