Skip to content

Commit 0d9fe83

Browse files
committed
Modify keyword function sample source.
1 parent 59c6ebe commit 0d9fe83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
def print_distance(value, unit='meters'):
22
print("Distance:", value, unit)
33

4-
print_distance(299792458) # is equal to light travels in 1 second.
5-
print_distance(220, 'yards') # is equal to 1 Furlong, used in horse racing.
4+
# 1 mile = 8 furlong = 1609.344 meters
5+
print_distance(1609.344)
6+
print_distance(8, 'furlongs') # used in horse racing.
7+
print_distance(1, unit='mile')

0 commit comments

Comments
 (0)