Skip to content

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-0108:00
├─────────┼─────────┼───────────┼──────────┼─────┤
Erik O.  StockholmGothenburg 2024-12-0114:00
├─────────┼─────────┼───────────┼──────────┼─────┤
Michel A.London   Los Angeles2024-12-0311:30
└─────────┴─────────┴───────────┴──────────┴─────┘
      delay flights
┌─────────┬─────────┬───────────┬──────────┬─────┐
Jari N.  Helsinki Tallinn    2024-12-0108:05
├─────────┼─────────┼───────────┼──────────┼─────┤
Erik O.  StockholmGothenburg 2024-12-0114:05
├─────────┼─────────┼───────────┼──────────┼─────┤
Michel A.London   Los Angeles2024-12-0311:30
└─────────┴─────────┴───────────┴──────────┴─────┘

Hint: You can use

delay←


{'Pi/',⍕÷⍵÷○1}○÷6 4 3 2 1 write exercise angle to name