Presentation is loading. Please wait.

Presentation is loading. Please wait.

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…

Similar presentations


Presentation on theme: "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…"— Presentation transcript:

1 Noadswood Science, 2014

2  To set out and solve an identified problem Monday, August 10, 2015 Box ‘a’Box ‘b’ 23 Box a is smaller than Box b…

3 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!

4 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

5 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 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’

6 Boxes – Designing The Solution inputs Box_A process value sizes output sizes int? input Box_B

7 Boxes – Designing The Solution inputs Box_A process value sizes output sizes int? input Box_B Ask for an input from the user If not an integer value then ask user to re-enter Sum the two numbers Display on screen the size of the two numbers and which is bigger

8 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

9 Boxes – Solution Development  Input for Box A and Box B

10 Boxes – Solution Development  Output after processing

11 Boxes – Solution Development  Error loop

12 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 = 10 Box_B = 20 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')

13 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…

14 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

15 Boxes – Programming Techniques #Boxes 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 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()

16 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.


Download ppt "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…"

Similar presentations


Ads by Google