Term project: a plant-growth predictor, from plan to talk
Your group will plan a plant-growth predictor for a class garden. Everything stays on paper. Start with the four skills in the table. The group measures one plant for four days: 10, 12, 14 and 16 cm (invented numbers). The pattern is a straight line with b = 10 and w = 2. The bars show it. The function predict_height(days) returns w * days + b; 3 days give 16 cm. A program must also check the typed number with try and except ValueError. Add a limit note: a plant stops growing, so the line is good only inside the days measured. For AI help, write a credit line and never type names, school or photos to an AI tool. Give each member a role: data collector, programmer, tester and speaker, then prepare a talk of a few minutes.
| Skill | For the plant-growth predictor |
|---|---|
| Decomposition | collect data, find w and b, write the function, check the input, test |
| Pattern recognition | a straight-line rule: the same growth each day |
| Abstraction | keep days and height; ignore the pot colour and the weather |
| Algorithm design | ask days, check, compute, show |
1def predict_height(days): 2 w = 2 3 b = 10 4 return w * days + b 5 6try: 7 days = int(input("How many days? ")) 8 print("Predicted height:", predict_height(days), "cm") 9except ValueError: 10 print("Please type digits only.")
How many days? 3 Predicted height: 16 cm
In your group, fill the plan on paper: the four skills, the flowchart, the data table with the bars, the function, the input check, the limit note, the credit line and the roles. Practise the talk twice and ask the listeners one question about the limit. Do not use any real name or photo.