DataDriven
LearnPracticeInterviewDiscussDailyJobs

Hands Apart

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

Domain
Python
Difficulty
easy
Seniority
L3

Problem

A calendar widget renders an analog clock face and needs to know how far apart the two hands sit. Given a `hour` (1 to 12) and a `minute` (0 to 59), return the smaller of the two angles in degrees between the hour and minute hands, remembering that the hour hand drifts continuously toward the next mark as the minutes pass rather than jumping on the hour.

Summary

Two hands. One gap. One number.

Practice This Problem

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

Related

  • All Practice Problems
  • Mock Interview Mode
  • Python Interview Questions
  • Data Engineering Interview Prep Guide
  • Daily Challenge
  • Data Engineering Lessons