Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf63ef1f

Browse files
committed
Add docstring
1 parent97bc285 commitf63ef1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎ch06-functions-and-loops/5-challenge-track-your-investments.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77

88
definvest(amount,rate,years):
9+
"""Display year on year growth of an initial investment"""
910
foryearinrange(1,years+1):
1011
amount=amount* (1+rate)
1112
print(f"year{year}: ${amount:,.2f}")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp