noadswood science, 2014. to set out and solve an identified problem monday, august 10, 2015 box...

16
Noadswood Science, 2014

Upload: marilyn-cole

Post on 23-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Noadswood Science, 2014

Page 2: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

To set out and solve an identified problem

Wednesday, April 19, 2023

Box ‘a’ Box ‘b’

2 3

Box a is smaller than Box b…

Page 3: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes

Mini Project I – create two boxes and have user input some numbers representing each box. Produce an output for these user inputs which says their sizes in relation to one another: - Box A (size x) is bigger than Box B (size y) Box B (size y) is bigger than Box A (size x) Box A (sixe x) is the same size as Box B (size y)

Usability test – is it clear for the user with what they have to do, as well as what is outputted?

Error test this – can it be broken?

Go from planning the idea, to a first draft version, to a beta test version to final product, along the way explaining what worked and what did not and how this was rectified!

Page 4: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

User Guide

You need to submit a user guide alongside your program (the user guide is actually more important than a working program)!

The user guide should include the following: - Design the solution

▪ What is the problem▪ How are you going to solve it (include flow charts and Pseudo code)

Solution development▪ How will your program complete the tasks required▪ Annotated code and screen shots of key features and functions

Programming techniques▪ What parts of the program have been designed and how do they work▪ Why were certain features included (identify data structures)▪ Identify how the system is robust

Testing and evaluation▪ Test plan identifying what tests will be carried out / data tests / expected results▪ Actions taken from test results ▪ Evaluation of the final product

Page 5: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Designing The Solution

A problem has been set where a user needs to input two numbers and then the program work out which is bigger

Information needs to be displayed for where the user is to input numbers and then a statement as to which is bigger must then be displayed

There are three possible outcomes (excluding errors in input): - Box A (size x) is bigger than Box B (size y) Box B (size y) is bigger than Box A (size x) Box A (sixe x) is the same size as Box B (size y)

10 1 1 10 5 5

Box ‘a’ is bigger than Box ‘b’

Box ‘a’ is smaller than Box ‘b’

Box ‘a’ is the same size as Box ‘b’

Page 6: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Designing The Solution

inputs Box_A

process value sizes

output sizes

int?

int?

input Box_B

Page 7: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Designing The Solution

inputs Box_A

process value sizes

output sizes

int?

int?

input Box_B

Ask for an input from the user

Ask for an input from the user

If not an integer value then ask user to re-enter

If not an integer value then ask user to re-enter

Sum the two numbersDisplay on screen the size of the two numbers and which

is bigger

Page 8: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Pseudocode

Box size function

input values for box A and box B

for each value

check it is an integer

if it is move to next item

output if A > B

output if A = B

Function takes an input from user

Multiple inputs are required

Inputs are checked if they are integers

if it is not an integer return to input

output if A < B

If inputs are integers move onto processing

If inputs are not integers go back to input

Output based on process calculation

Page 9: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Solution Development

Input for Box A and Box B

Page 10: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Solution Development

Output after processing

Page 11: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Solution Development

Error loop

Page 12: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Programming Techniques

One of the initial setups is to test the math within Python and produce an output

In the first instance this can be tested with pre-assigned numbers for Box_A and Box_B

Box_A = 10Box_B = 20if Box_A == Box_B: print('Box A and Box B are the same value')if Box_A > Box_B: print('Box A is bigger than Box B')if Box_A < Box_B: print('Box A is smaller than Box B')

Page 13: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Programming Techniques

The second task was to allow the user to input numbers

Box_A = input(‘Please enter a value for Box A: ‘))Box_B = input(‘Please enter a value for Box B: ‘))

It was then decided it would look nicer if a message appeared confirming the numerical input

Box_A = input(‘Please enter a value for Box A: ‘))Box_B = input(‘Please enter a value for Box B: ‘))print('Thanks! You entered a value of', Box_A, 'for Box A and a value of',

Box_B, 'for Box B')

This worked, however the program could easily be broken if an integer was not entered…

Page 14: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Programming Techniques

The ensure the user only entered an integer a while loop was added for both inputs…

while True: try: Box_A = int(input('Please enter a value for Box A: ')) except ValueError: print("Sorry, you need to enter a whole number") continue if Box_A >= 0: break

while True: try: Box_B = int(input('Please enter a value for Box B: ')) except ValueError: print("Sorry, you need to enter a whole number") continue if Box_B >= 0: break

Page 15: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Programming Techniques

#Boxeswhile True: try: Box_A = int(input('Please enter a value for Box A: ')) except ValueError: print("Sorry, you need to enter a whole number") continue if Box_A >= 0: break

while True: try: Box_B = int(input('Please enter a value for Box B: ')) except ValueError: print("Sorry, you need to enter a whole number") continue if Box_B >= 0: break

print('Thanks! You entered a value of', Box_A, 'for Box A and a value of', Box_B, 'for Box B')if Box_A == Box_B: print('Box A and Box B are the same value')if Box_A > Box_B: print('Box A is bigger than Box B')if Box_A < Box_B: print('Box A is smaller than Box B')input()

Page 16: Noadswood Science, 2014.  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

Boxes – Testing & Evaluation

The program is then tested and commented upon with the mark scheme stipulating the following: -

There is a full or nearly full test plan that shows all or nearly all of the expected tests and includes the full test data to be used and the expected results

There is evidence that all or almost all of the planned tests have been carried out and a detailed record of the results has been produced showing the extent to which every test was successful. There is evidence that all or almost all of the required remedial action has been carried out.

There is an evaluation discussing how the final solution meets all or nearly all of the original needs of the user. The evidence is accurately spelt, punctuated and grammatically correct to make the meaning clear. The form and style of writing is appropriate. Information is clearly organised and specialist vocabulary has been used appropriately.