The Create Performance Task (guided) · Tạo Nhiệm vụ Hiệu suất (hướng dẫn)
The Create Performance Task
- The Create Performance Task is a small program you design and build yourself.
- For the real AP exam you submit it (your code, a video, and written answers) through the AP Digital Portfolio.
- Important: the real task is graded by AP, not by this site. This lesson only helps you practice and structure it.
Bài thi Thực hành Tạo (Create Performance Task)
- Bài thi Thực hành Tạo là một chương trình nhỏ bạn tự thiết kế và xây dựng.
- Đối với kỳ thi AP thực tế, bạn nộp nó (mã nguồn, video và câu trả lời bằng văn bản) qua Hồ sơ số AP.
- Quan trọng: bài thi thực tế do AP chấm điểm, không phải bởi trang web này. Bài học này chỉ giúp bạn luyện tập và sắp xếp cấu trúc.
What your program must include
- A list (or other collection) that stores many values together.
- A procedure (a function) that takes at least one parameter, and that you call in your code.
- An algorithm with selection (
if) inside iteration (a loop). - Some input and some output so the program does something useful.
Chương trình của bạn phải bao gồm
- Một danh sách (hoặc bộ chứa khác) lưu trữ nhiều giá trị cùng nhau.
- Một thủ tục (hàm) nhận ít nhất một tham số, và bạn gọi nó trong mã nguồn của mình.
- Một thuật toán có lựa chọn (
if) bên trong vòng lặp (iteration). - Một số đầu vào và một số đầu ra để chương trình làm được việc gì đó hữu ích.
Pick a small idea
- Keep it simple: you only need to show the skills above, not build a huge app.
- Good ideas: grade a list of scores, total a shopping list, sort students into teams, count words.
- Choose data you understand, so you can explain it later.
Chọn một ý tưởng nhỏ
- Giữ đơn giản: bạn chỉ cần thể hiện các kỹ năng trên, không cần xây dựng một ứng dụng khổng lồ.
- Ý tưởng tốt: chấm điểm một danh sách điểm số, tổng hóa đơn mua sắm, phân loại học sinh vào đội, đếm từ.
- Chọn dữ liệu bạn hiểu rõ, để bạn có thể giải thích sau này.
A starter scaffold
- The program below has all the required parts. Read the comments to find each one.
- It uses a fixed list so it runs the same every time (no live typing needed here).
- Run it, then change the data and rules to make it your own.
Khung mẫu khởi đầu
- Chương trình bên dưới có tất cả các phần bắt buộc. Đọc các chú thích để tìm từng phần.
- Nó sử dụng danh sách cố định nên chạy giống nhau mỗi lần (không cần nhập dữ liệu trực tiếp ở đây).
- Chạy nó, sau đó thay đổi dữ liệu và quy tắc để tạo ra phiên bản của riêng bạn.
# 1) A LIST that stores many values
scores = [72, 95, 58, 88, 40, 67]
# 2) A PROCEDURE with a PARAMETER, that returns a result
def grade_for(score):
# selection inside the procedure: choose a letter for one score
if score >= 90:
return "A"
elif score >= 70:
return "B"
elif score >= 50:
return "C"
else:
return "F"
# 3) An ALGORITHM: SELECTION (if) INSIDE ITERATION (for loop)
pass_count = 0
for s in scores: # iteration: visit every score
letter = grade_for(s) # call the procedure with a parameter
if letter != "F": # selection: is this a pass?
pass_count = pass_count + 1
print(f"score {s} -> grade {letter}") # output
# More output: a summary
print(f"{pass_count} out of {len(scores)} passed")
Make it your own
- Change the list to your own data (and try a different length).
- Change the procedure: new rule, new parameter name, or return something else.
- Change the algorithm: count something new, or keep only items that pass the
if. - Add input if you like, for example
input("Enter a name: ").
Biến nó thành của riêng bạn
- Thay đổi danh sách thành dữ liệu của bạn (và thử độ dài khác).
- Thay đổi thủ tục: quy tắc mới, tên tham số mới, hoặc trả về thứ khác.
- Thay đổi thuật toán: đếm cái gì đó mới, hoặc giữ lại chỉ các mục đạt tiêu chuẩn
if. - Thêm đầu vào nếu muốn, ví dụ như
input("Enter a name: ").
Written-response prompts
- Answer these about your own program (this is the kind of writing the real task asks for):
- Purpose: What does your program do, and why is it useful?
- List: What does your list store, and how does using one list (instead of many separate variables) make the program simpler to manage?
Câu hỏi trả lời bằng văn bản
- Trả lời những câu hỏi về chương trình của bạn (đây là dạng bài viết mà bài thi thực yêu cầu):
- Mục đích: Chương trình của bạn làm gì, và tại sao nó hữu ích?
- Danh sách: Danh sách của bạn lưu trữ cái gì, và việc sử dụng một danh sách (thay vì nhiều biến riêng lẻ) làm cho chương trình dễ quản lý hơn như thế nào?
More written-response prompts
- Procedure & parameter: Name your procedure. What is its parameter, and what does the procedure do with it? What does it return?
- Algorithm: Describe the algorithm inside your loop in your own words. Point to where it uses selection (
if) and where it uses iteration (the loop), and say why both are needed.
Nhiều câu hỏi trả lời bằng văn bản hơn
- Thủ tục & Tham số: Đặt tên cho thủ tục của bạn. Tham số của nó là gì, và thủ tục làm gì với nó? Nó trả về cái gì?
- Thuật toán: Mô tả thuật toán bên trong vòng lặp của bạn bằng lời của riêng bạn. Chỉ ra nơi sử dụng lựa chọn (
if) và nơi sử dụng vòng lặp (iteration), và nói tại sao cả hai đều cần thiết.
Rubric checklist
- Tick each item once your program has it:
Bảng kiểm tiêu chí chấm điểm
- Tích vào mỗi mục một khi chương trình của bạn có nó:
[ ] A list (or collection) is used in the program
[ ] A procedure is defined WITH at least one parameter
[ ] That procedure is CALLED somewhere in the program
[ ] The procedure does real work (not empty)
[ ] An algorithm uses selection (if) INSIDE iteration (a loop)
[ ] The program has input and/or output
[ ] I can explain every part in my own words
You can do this
- Start small, run it often, and fix one thing at a time.
- When every box above is ticked, you have the structure the Create Task needs.
- Remember: practice here first, then submit the real task through the AP Digital Portfolio.
Bạn có thể làm được
- Bắt đầu nhỏ, chạy thường xuyên, và sửa từng lỗi một.
- Khi mọi ô tích phía trên đã được đánh dấu, bạn đã có cấu trúc mà Bài thi Tạo cần.
- Nhớ: luyện tập ở đây trước, sau đó nộp bài thi thực qua Hồ sơ số AP.
Common mistakes
- Plan the program's purpose first, then build in small tested pieces.
- Be ready to explain what each part of your code does.
Lỗi thường gặp
- Lập kế hoạch mục đích của chương trình trước, sau đó xây dựng từng phần nhỏ đã được kiểm chứng.
- Sẵn sàng giải thích xem mỗi phần mã của bạn làm gì.
Now you try
- A warm-up: assemble the required parts once, using the scaffold's example data.
- Press Check answer to confirm every required part is there.
Bây giờ bạn thử
- Bài khởi động: ghép nối các phần bắt buộc một lần, sử dụng dữ liệu ví dụ từ khung mẫu.
- Nhấn Kiểm tra câu trả lời để xác nhận mọi phần bắt buộc đều có mặt.
A warm-up that uses the scaffold's example data. (1) Keep the list scores. (2) Define grade_for(score) (one parameter) returning "A"/"B"/"C"/"F" by the rules above (>= 90, >= 70, >= 50, else "F"). (3) With selection (if) inside a loop over scores, count how many pass (grade is not "F") into pass_count. (4) print a summary line. · Bài khởi động sử dụng dữ liệu mẫu của khung hỗ trợ. (1) Giữ nguyên danh sách scores. (2) Định nghĩa grade_for(score) (một tham số) trả về "A"/"B"/"C"/"F" theo quy tắc trên (>= 90, >= 70, >= 50, ngược lại "F"). (3) Với câu chọn lọc (if) bên trong vòng lặp duyệt qua scores, đếm số lượng người lưu (điểm không phải là "F") vào pass_count. (4) print một dòng tóm tắt.
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.
The Create task also needs an algorithm you built yourself. Write top_score(scores) that returns the highest value using a loop — start with the first score, then compare each one. Do not use the built-in max. Then print the result. · Nhiệm vụ Tạo cũng cần một thuật toán do bạn tự xây dựng. Viết top_score(scores) trả về giá trị cao nhất bằng cách sử dụng vòng lặp — bắt đầu với điểm đầu tiên, sau đó so sánh từng điểm. Không sử dụng hàm tích hợp max. Sau đó print kết quả.
Click Run to see the output here. · Nhấn Chạy để xem kết quả ở đây.