由於某些原因,我一直在「Math」上收到NameError。input()錯誤 - NameError:名稱'...'未定義
years = 10
D = 100
p = 0.075/12
T = years * 12
S = D * ((math.pow(1 + p, T) - 1)/p)
print("In", years, "years, $", end = "")
print(D, "deposited per month will grow to $", end = "")
SFormatted = "%.2f" % S
print(SFormatted, ".", sep = "")
你似乎沒有被使用的代碼輸入。 –
我很抱歉,但看起來如何?就像我說的我是一個完整的新手......有一位朋友幫我解決了這個問題>< – diags187
在這種情況下,我建議讓他的朋友幫你解決他們給你的代碼。堆棧溢出不是一種編碼或調試服務。請回顧[我如何問一個好問題](https://stackoverflow.com/help/how-to-ask)。 – FluffyKitten