성능 작업 만들기 (유도형)
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
The Create Performance Task
- You develop your own program for a purpose you can explain. The AP Digital Portfolio receives program code, a video, and your Personalized Project Reference (PPR). Written responses are completed on the AP exam.
- This lesson is practice, not AP scoring or submission approval. Use the current College Board student handouts; do not submit this supplied example as your own student-developed code.
English
What the program needs
- Include input from a user, device, online data stream or file, and output based on that input. A list must help manage complexity, not merely appear in the code.
- Your selected student-developed procedure needs a parameter that affects its work and an algorithm with sequencing, selection and iteration in its body. Show a call to that procedure.
English
Keep the algorithm inside the procedure
- In
report_for(scores), the count starts at zero (sequencing), a loop visits the scores (iteration), andifchooses which scores count (selection). grade_for(score)is a useful helper. It has selection but no loop, so it alone does not meet the selected procedure's algorithm requirement.
English
A complete practice example
- Type whole-number scores from 0 to 100, separated by spaces, such as
72 95 58 88 40 67. This is real user input; the procedure returns a summary based on the list. - Try another list and explain how its contents change the result. This teacher-provided example demonstrates the structure; your assessed work must meet the authorship rules.
English
def grade_for(score):
if score >= 90:
return "A"
elif score >= 70:
return "B"
elif score >= 50:
return "C"
return "F"
def report_for(scores):
pass_count = 0
for score in scores:
if grade_for(score) != "F":
pass_count += 1
return pass_count
try:
scores = [int(part) for part in input("Scores: ").split()]
if not scores or any(score < 0 or score > 100 for score in scores):
print("Enter one or more whole scores from 0 to 100.")
else:
pass_count = report_for(scores)
print(f"{pass_count} out of {len(scores)} passed")
except ValueError:
print("Enter whole numbers separated by spaces.")
English
Test the boundaries
- The pass boundary is 50:
report_for([49, 50, 51])returns 2. A different list length must work too; the function must not return a memorised count. report_foraccepts an empty list and returns zero. The interactive program asks for at least one score because an empty class summary is not useful here.
English
Explain your choices
- Purpose and list: What does your program do? How does storing related values together make it simpler to develop or maintain than separate variables?
- Procedure and algorithm: How does the parameter affect the result? Point to sequencing, selection and iteration inside your selected procedure, then explain a test that exercises a different path.
English
Prepare the right evidence
- The PPR includes selected list/procedure code segments and a procedure call. It is created independently and must not include comments or course content. Follow the official instructions for each submission component.
- Program-code attribution and PPR presentation have different rules. A practice program, this site's check, or a copied scaffold does not certify your final AP submission.
English
Practice below
- The first task uses fixed example data to practise
grade_forandreport_for; it is not a full Create submission. The second practises a loop that finds a maximum in a nonempty list. The third counts the scores at or above a pass mark, using a parameter, a loop and anif. - Check answer tests these practice functions. Review the current official handouts and be ready to explain your own program on the exam.
난이도 4/5 · 280코인 + 오늘 첫 완료 시 작은 보너스 추가
고정된 점수 목록을 사용하여 스패프를 연습하십시오. grade_for(score)를 정의하여 레슨의 경계를 적용하고, A는 90 이상, B는 70 이상, C는 50 이상, 나머지는 F로 설정하십시오. report_for(scores)를 루프와 내부 선택으로 정의하여 합격 점수를 세게 하십시오. 이를 호출하여 pass_count를 설정한 후 요약 결과를 출력하십시오. 이 고정 데이터 예습은 완전한 AP 제출물이 아닙니다.
출력을 보려면 '실행'을 클릭하세요.
난이도 4/5 · 280코인 + 오늘 첫 완료 시 작은 보너스 추가
다른 연습 알고리즘: 루프를 사용하여 비공집합 목록에서 최대값을 반환하는 top_score(scores)를 작성하십시오. 첫 번째 점수에서 시작하여 하나씩 비교하십시오. 내장 함수 max을 사용하지 마십시오. 그런 다음 결과를 print하십시오.
출력을 보려면 '실행'을 클릭하세요.
난이도 4/5 · 280코인 + 오늘 첫 완료 시 작은 보너스 추가
A 생성 작업 절차에는 매개변수, 목록, 그리고 선택 및 반복이 필요합니다. count_passing(scores, pass_mark)를 작성하여 최소 pass_mark인 점수의 개수를 반환하십시오. 루프에 if를 사용하여 작업에서 요구하는 선택과 반복을 보여줍니다.
출력을 보려면 '실행'을 클릭하세요.