Tuesday 21 June 2016

#10misc3 #10nisc6 #10pisc6 A Population Model - Task One

Lesson Objectives 
LO1 – To understand how to solve Task 1 of your A Population Model controlled assessment LO2 – To learn how to use print(), input() and if() to create a simple menu system
LO3 - To show evidence of your  

Outcomes
Red - You will have created a simple menu using python code
Amber - You will have adapted your code to complete task1 of your controlled assessment
Green - You will have added evidence of your task 1 to your evidence document in Word

1. Follow the red, amber, green tasks on your worksheet 

2. Follow the blue task on your worksheet to apply the skills you have learnt to develop a main menu for your Population Model program. The options on the main menu should be:

1.            Set the Generation 0 values
2.            Display the Generation 0 values
3.            Run the model
4.            Export data
5.            Quit.

3. Use # to add comments into your code explaining how it works

4. Under the Solution Development heading add a subheading, Task 1 Code

5. Copy and paste your task 1 code in

6. Under the Programming Techniques add a sub heading Programming Techniques Used

7. Create the following table and then complete it:

Task Num
Technique Used
What does it do?
How I have used it?
1
print()
Displays things on the screen
I used it to display my menu and to show messages telling the user which option they have picked
1
if() / elif()


1
int()


1
input()


1
exit()



8. Under the Programming Techniques add a sub heading Data Structures Used

9. Create the following table and then complete it:

Task Num
Data Structure Name
Data Structure Type
Data Type Stored In it
Purpose
1
choice
Variable
Integer


10. Under the Testing and Evaluation heading add a sub heading Task 1 Test Plan

11. Create the following table and then complete it:
Test Number
User Input
Expected Outcome
Actual Outcome
Action Taken
1
None
Menu shows on screen


2
1
Tells users they have chosen to set generation 0 values


3




4




5




6





12. Underneath your Task 1 Test Plan add screenshots showing the results of each of your tests

Extension Task1:
What happens if your user types in a number that is not between 1 and 6?
Can you add to your code so that your menu can handle this?

Extension Task2:
What happens if your user types in something that is not a number at all?
Can you add to your code so that your menu can handle this?

Extension Task3:
Update your Programming Techniques Used table
Update your Data Structures Used table
Update your Task 1 Test Plan table