Indexing arrays
You have kept up your training regime to get faster over 5000m runs. After a few weeks of training regularly, you want to look back at your run times to see if your new times are better than your old ones.
The array of floats of your run times is available in your environment as runtimes.
この演習はコースの一部です
Introduction to Julia
演習の手順
- Select the first run time and assign it to the variable
first_runtime. - Select the last run time and assign it to the variable
last_runtime. - Calculate the difference in times by subtracting the last run time from the first.
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Select the first run time
first_runtime = ____
# Select the last run time
last_runtime = ____
# Calculate the difference
time_diff = ____
println("Last run time was $time_diff minutes faster")