時間が難しい本当の理由(長い旅と短い旅)
W20529 が行った 291 件のトリップのうち、最長はどれくらいでしたか?最短はどれくらいでしたか?不自然に見えるものはありますか?
これまでと同様、データは onebike_durations として読み込まれています。
この演習はコースの一部です
Pythonで扱う日付と時刻
演習の手順
onebike_durationsからshortest_tripを計算します。onebike_durationsからlongest_tripを計算します。shortest_tripとlongest_tripを文字列に変換して、結果を出力します。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Calculate shortest and longest trips
shortest_trip = ____(____)
longest_trip = ____(____)
# Print out the results
print("The shortest trip was " + ____ + " seconds")
print("The longest trip was " + ____ + " seconds")