7_2_7

WHAT: Evaluate a computational abstraction that models the state and behaviour of real world problems and physical systems

HOW:

Activity 1

During the last outcome you designed your own computational abstractions. If you haven't completed this outcome then complete it now before looking at this one.

Activity 2

What does evaluate mean?

Why should we evaluate our solutions?

Write down your thoughts.

Activity 3

When we evaluate a solution we look at how effective we have been and make judgments based on the evidence.

Key questions to get you started would be:

  • Have I solved the problem?
  • Will it work in the real world?
  • Is there too much detail?
  • Are there too many steps?
  • Is there enough detail?
  • Can I simplify it further?
  • Can a "test user" work with my solution?

Take a look at your solutions from the last outcome and try to evaluate the effectiveness of your solutions. Use the prompts above to guide you.

Activity 4

Below is some Python code for the times tables, copy and paste it into a new file and run it to see what happens.

CLICK THIS LINK TO TRY IT IN YOUR BROWSER

# Version 1 - simply prints it on the screen

print ("This is the 2 times table")
print ("1 x 2 is 2")
print ("2 x 2 is 4")
print ("3 x 2 is 6")
print ("4 x 2 is 8")
print ("5 x 2 is 10")
print ("6 x 2 is 12")
print ("7 x 2 is 14")
print ("8 x 2 is 16")
print ("9 x 2 is 18")
print ("10 x 2 is 20")

# Version 2 - uses less code but doesn't have the words with it

print ("This is the 2 times table")
for x in range(1,11):
    print (x*2)

# Version 3 - a bit more code and includes the words

print ("This is the 2 times table")
for x in range(1,11):
    print (str(x)+" x 2 is "+str(x*2))

# Version 4 - asks the user to type which times table they want to see

times=int(input("Which times table would you like to do?"))
for x in range (1,11):
    print (str(x)+" x "+str(times)+" is "+str(x*times))

Activity 5 - READ

There are 4 different versions for the same problem. The original problem was "I need something that prints the 2 times table".

When we evaluate the solutions we decide if the solution is effective or not. Here are some evaluations of each version:

  • Version 1 - This does exactly what is required. However, it takes the programmer 11 lines of code to create it. This could make it more likely to make an error in the code. It also requires a lot of re-typing if the user decided they wanted to re-use the code for a different times table.
  • Version 2 - This does exactly what is required. However, it isn't very informative for the user. The first version shows the words as well so that it is clear what each number represents. This version is good because you could update it later on for a different times table by changing just a few bits of the code.
  • Version 3 - This is better for the user than version 2 because it shows the words alongside the numbers so that it is easier to see what each number represents.
  • Version 4 - This one is the most adaptable because the user can enter any times table that they require. This "future proofs" the program. However, the original request was for the 2 times table so it does a little more than it should.

CHECK:

EMBED:

Watch the video on Nuclear Reactor Safety. It shows you a real world system that is dependent on having strict safety regulations.

What could happen if the computer programs that have been created for this system weren't properly evaluated before they were used?

CLASSROOM IDEAS:

Evaluating is a skill that needs to be practiced many times before a student can confidently spot potential problems. For each problem that you give them, make sure that you take time to evaluate their solutions. Take a few lessons to practice it, don't just treat it as a quick add on if they have finished early.