나는 루프에 의해 반환되는 'totalTimes'의 합계를 계산할 수 있기를 원합니다. 그것을하는 방법에 대한 아이디어? 여기에 내가 현재 가지고있는 코드 :루프의 결과 요약
감사
subjectsNum = int(input ("How many subjects do you have to study?"))
def subject():
for i in range (1, subjectsNum+1):
subjectName = input ("What is the subject name?")
pagesQuantity = float(input ("How many pages do you have to study?"))
pagesTime = float (input ("How long do you reckon it will take to study one page (in minutes)?"))
totalTime = (pagesQuantity) * (pagesTime)/60
print("The estimated time to study %s is %s hours" %(subjectName, totalTime))
subject()