Write exercises
Remember, you can test your code out on TryAPL before submitting it here! You can submit as many solutions as you like.
Since this course is still a work-in-progress, solving the write exercises will currently not lead to any credits.
Write problem 4
Write a function to delay all flights on the first of december by 5 minutes. You can assume that all the times listed end with '30' or '00'.
flights
┌─────────┬─────────┬───────────┬──────────┬─────┐
│Jari N. │Helsinki │Tallinn │2024-12-01│08:00│
├─────────┼─────────┼───────────┼──────────┼─────┤
│Erik O. │Stockholm│Gothenburg │2024-12-01│14:00│
├─────────┼─────────┼───────────┼──────────┼─────┤
│Michel A.│London │Los Angeles│2024-12-03│11:30│
└─────────┴─────────┴───────────┴──────────┴─────┘
delay flights
┌─────────┬─────────┬───────────┬──────────┬─────┐
│Jari N. │Helsinki │Tallinn │2024-12-01│08:05│
├─────────┼─────────┼───────────┼──────────┼─────┤
│Erik O. │Stockholm│Gothenburg │2024-12-01│14:05│
├─────────┼─────────┼───────────┼──────────┼─────┤
│Michel A.│London │Los Angeles│2024-12-03│11:30│
└─────────┴─────────┴───────────┴──────────┴─────┘
Hint: You can use
delay←
{'Pi/',⍕÷⍵÷○1}○÷6 4 3 2 1 write exercise angle to name