Question

In: Computer Science

Given a clock on the planet 9 with hour, minute, and second hands, where day last 14 hours (hour hand circles twice for a day)

USE MATLAB

Given a clock on the planet 9 with hour, minute, and second hands, where day last 14 hours (hour hand circles twice for a day)

a) At what time (in hours), the first time after 0th hour, all 3 hands will overlap,

b) At what times (in hours) they will overlap between 0th hour and 7th hour?


Solutions

Expert Solution

In this problem let us relate earth to planet9.

compare

# EARTH PLANET 9 HOURS 24 14 CLOCK 12 7 OVERLAP 11 6

So in planet 9, we will have 6 overlaps between 0th hour and 7th hour. Therefore time difference would be 7/6 hours.
We will have 6 times overlapping in 7 hours.
Please see the output and code for better understanding.
****************************************************************************************
Code

function [] = overlap()
day_hours = 14;
clock = day_hours/2;
time_diff = clock/(clock-1);
disp(['The first time after 0th hour, all 3 hands will overlap at ',num2str(time_diff),' hours']);
disp(['Times (in hours) they will overlap between 0th hour and 7th hour are:',num2str(time_diff)]);
overlap_time = 0;
for r = 1:clock-1
overlap_time = overlap_time + time_diff;
disp(['Time : ',num2str(overlap_time),' hours']);
end
end

************************************************************************

OUTPUTS:


Related Solutions

Determine where the short hand and long hands meet on the clock. Involve minute and second...
Determine where the short hand and long hands meet on the clock. Involve minute and second in the expression (no longer fraction such as 5.45 but 5 minutes 60x0.45=27 seconds). Run full 12 hours for AM or PM. Use python to solve this problem. Use numpy if needed.
At 3:00 the hour hand and the minute hand of a clock point in directions that...
At 3:00 the hour hand and the minute hand of a clock point in directions that are 90° apart. What is the first time after 3:00 that the angle between the two hands has decreased to 26.0°?
A clock has an hour hand of length 2.4 cm and a minute hand of length...
A clock has an hour hand of length 2.4 cm and a minute hand of length 3.8 cm. (a) Calculate the position and velocity of the hour hand at noon. (b) Calculate the position and velocity of the minute hand at 12:15.
You are on a planet where the moon's orbit is approximately 9 weeks (i.e. twice the...
You are on a planet where the moon's orbit is approximately 9 weeks (i.e. twice the period of earth's moon), but the distance to the moon is also twice as much. The mass of the planet is ____ times that of earth.
20 employees who make 14 per hour. They all worked 50 hours last payroll period. Calculate...
20 employees who make 14 per hour. They all worked 50 hours last payroll period. Calculate the payroll tax liability for its employees for the period. Show your work and explain your answer. Assume the following rates: FICA: 6.20% MED:1.45% WHT 10%
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT