Evaluating a solution against constraints

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Evaluating a solution against constraints

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student's team had 2 weeks to build a quiz app and handed it in on day 14. Was the time constraint met?
A Met - it was finished within the 2 weeks
B Not met - it was finished within the 2 weeks
2. Which sentence best evaluates a solution against constraints?
A The app looks cool and I like the colours.
B The budget was met, but we dropped the music feature to stay under $20.
3. Your game had to run on school laptops, but it only works on a gaming computer. What should you say about the device constraint?
A Not met - it does not run on the required device
B Met - gaming computers are better anyway
4. What is a trade-off?
A Giving up one thing, like a feature, to stay within a limit, like time
B Swapping your finished app with another team
5. A team had only 3 days left, so they removed the high-score table from their game. This is an example of:
A A constraint that had no effect
B A trade-off that affected the features

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Constraint: finish in 4 weeks. Result: finished in 6 weeks. AThe result says met, but spending $140 is over the $100 limit, so it should say not met.
2Constraint: budget $50. Result: spent $45. BEffect: the app only runs on phones, so no laptop version.
3A trade-off is giving up one thing to keep within a constraint. CTrade-off: dropped the music feature to finish on time.
4Explain the effect on features when a constraint limits a solution. DThe solution used skills beyond the limit, so the skill constraint was not met. It should also explain the effect.
5Budget was $100. We spent $140. Budget constraint: met. EThe budget constraint was met because the cost stayed within the limit.
6Skill limit: only block coding. Result: used advanced text code. Skill constraint: met. FThe time constraint was not met because the project took longer than the limit.

Definitions

evaluate against constraints

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF daysUsed _ daysAllowed THEN SET result TO "not met" ELSE SET result TO "met"
2.
__ cost > budget THEN SET budgetResult TO "not met" ELSE SET budgetResult TO "met"
3.
SET ________ TO "dropped video to save time" SET effect TO "fewer features in the app"
4.
IF time = "met" ___ cost = "met" THEN DISPLAY "All constraints met" ELSE DISPLAY "Some not met"
5.
IF skillLevel _ skillNeeded THEN SET features TO features - 1 DISPLAY "Skill limit not met"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A constraint ← budget
B limit ← 100
C spent ← 150
D result ← met
Question 2
A used ← 5, limit ← 6
B IF used >= limit THEN
C result ← met
D ELSE result ← not met
Question 3
A constraint ← runs on tablets
B feature ← mouse hover menu
C result ← met
Question 4
A constraint ← time (3 weeks)
B removed ← multiplayer mode
C kept ← score and levels
D trade-off ← more features
Question 5
A constraint ← skill
B skill ← basic Scratch only
C approach ← use advanced Python
D result ← met

Answer Key

Evaluating a solution against constraints
Section A: Quick Questions
Q1
A — Met - it was finished within the 2 weeks
Q2
B — The budget was met, but we dropped the music feature to stay under $20.
Q3
A — Not met - it does not run on the required device
Q4
A — Giving up one thing, like a feature, to stay within a limit, like time
Q5
B — A trade-off that affected the features
Section B: Match the Pairs
Q1
Constraint: finish in 4 weeks. Result: finished in 6 weeks. → The time constraint was not met because the project took longer than the limit.
Q2
Constraint: budget $50. Result: spent $45. → The budget constraint was met because the cost stayed within the limit.
Q3
A trade-off is giving up one thing to keep within a constraint. → Trade-off: dropped the music feature to finish on time.
Q4
Explain the effect on features when a constraint limits a solution. → Effect: the app only runs on phones, so no laptop version.
Q5
Budget was $100. We spent $140. Budget constraint: met. → The result says met, but spending $140 is over the $100 limit, so it should say not met.
Q6
Skill limit: only block coding. Result: used advanced text code. Skill constraint: met. → The solution used skills beyond the limit, so the skill constraint was not met. It should also explain the effect.
Section C: Definitions
Q1
evaluate against constraints — Check if a solution stayed within its time, budget, device and skill limits, say if each was met or not met, and explain what trade-offs were made and how they affected its features.
Section D: Fill in the Blanks
Q1
IF daysUsed > daysAllowed THEN SET result TO "not met" ELSE SET result TO "met"
Q2
IF cost > budget THEN SET budgetResult TO "not met" ELSE SET budgetResult TO "met"
Q3
SET tradeoff TO "dropped video to save time" SET effect TO "fewer features in the app"
Q4
IF time = "met" AND cost = "met" THEN DISPLAY "All constraints met" ELSE DISPLAY "Some not met"
Q5
IF skillLevel < skillNeeded THEN SET features TO features - 1 DISPLAY "Skill limit not met"
Section E: Spot the Error
Q1
B — The solution spent 150, so a limit of 100 would mean the budget was not met. The result says met, so the limit should be 200.
Q2
B — The time constraint is met when the time used is less than or equal to the limit. The test should use <=, not >=.
Q3
B — Tablets have no mouse, so a hover menu breaks the device constraint and the result could not be met. Tap buttons work on a tablet.
Q4
D — The team removed multiplayer mode to finish on time, so the trade-off was fewer features, not more.
Q5
C — The creator only has basic Scratch skills, so using advanced Python goes beyond the skill constraint. The approach should use simple blocks.