-1
我寫我的第一個代碼,無法弄清楚這個錯誤意味着什麼,我應該修復,請幫助。錯誤:解析時意外的eof錯誤:解析時意外的eof?
import math
def circumference(r):
return 2 * math.pi * r
def area(r) :
return math.pi * radius**2 * r
fName = input("Please enter your first name: ")
lName = input("Please enter your last name: ")
radius = float(input(fName + " " + lName + " , please enter your radius: "))
print("Hello %s %s Your circumference is %s and your area is %s " % (fName, lName, circumference(radius), area(radius))
你如何運行你的腳本? – Daniel
你忘記了在末尾 – ailin
的右括號,如果你使用python3,你可以使用'str.format()',[here](https://docs.python.org/3/library/string.html#format例子) – ailin