Monday 5 October 2015

Using Python.com

Using Python.Com  Challenges

In order to refine your Python skills for the controlled assessment all students should ensure that they understand can complete the following challenges.  If you can’t complete a challenge find out where you are going wrong and correct – do not move on until you have completed each challenge.
Your teacher will provide you with solutions:

If you are unsure about any of the basics work through the introductory sections from the main menu.

No.
Challenge
Completion
Done:  Yes/No
1.
If-else statement + BOB challenge.


T2 W1

2.
Python for loops + Dr Love challenge.


T2 W1

3.
Python while loops + Double or quit game


T2 W2

4.
Python ‘elif’ + BOB V3 challenge


T2 W2

5.
Python arrays + challenge



T2 W3

6.
Python Lists + RPG Computer game challenge


T2 W3

7.
Arrays and Loops + Homework marks challenge


T2 W5


8.
Dictionaries + translator challenge


T2 W5

9.
Functions + challenge



T2 W6


10.
Python File Handling + Challenge


T2 W6


11.
Python Pickling

T2 W6

12
Python Programming Challenges

Select the email validator + 2 more challenges

Xmas Holiday




Wednesday 2 September 2015

Welcome Back 03/09/15


This term we are really going to work at understanding Python:


A Python Crash Course can be found in the following folder:


Hopefully it's shared.

We are also going to complete the Summer Controlled  Assessment.  A link to this can be found here:



Using Python

Another great resource which is recommended by the Edexcel Exam board for this course is Using Python:







Thursday 16 July 2015

A Wee Python Challenge

A Wee Python Challenge


In today's lesson we are going to start with a mini Python challenge.

Your Task:

Answer the two problems below.

Screen dump the code and the output to a Google document and post the URL to the blog.

NOTE:  If you get help from another website or a peer acknowledge this under a heading called 'Sources'.

Problems

1. Write a program in Python which adds up 3 numbers which are inputted by the user.

2. Write a program in Python which finds the maximum number in the list below:

[7,15,4,5,22,32,45,19]

When you have finished the challenge you may continue with the Controlled assessment work:

Extension Challenge (Optional but worth doing for CA)

Write a Python Program for a 'Tic Tac Toe' game.  This is quite a big program and you may want to reserach and try it out as an additional task over the Summer.

.


Thursday 9 July 2015

Controlled Assessment/Summer Work

Controlled Assessment/Summer Work


Platinum 

(1) Complete all three questions according to the brief.

(2) Screen dump, code, testing plans and evaluations into one carefully laid out google doc.

(3) Reply to this post with a link to your google.doc by 1st September 2015

Gold

(1) Complete Question 3 and check against code.

(2) In a google.doc show a copy of your code and your test plan.

(3) Reply to this post with a link to your google.doc by 1st September 2015

Silver

(1) Carefully examine the code for Q3.  Copy into a google doc and annotate explaining carefully what each section of code does..

(2) Write an algorithm explaining what the code does.

(3) Reply to this post with a link to your google.doc by 1st September 2015


Materials 

(1) Click on the link below for the question exemplar paper:

http://qualifications.pearson.com/content/dam/pdf/GCSE/Computer%20Science/2013/Specification%20and%20sample%20assessments/GCSE_in_Computer_Science_SCAM_TYPESET.pdf

(1) Click on the link below for the example of the code for Q1.

https://docs.google.com/document/d/1tJvvPQh4N0-pYAT00D4iXFeknFPrN-tHTAL5DkKWvyY/edit

(2) Click on the link below for the example of the code for Q2.

https://docs.google.com/document/d/1Qud2jkxJPUsb2Sb38F6YRVFtUekEYxgKWNSHiRTzWw4/edit

Click on the link below for an example of the testing plan for Q2

https://docs.google.com/document/d/1uIle_JzzYJA3APJYVxrhiCyvprLlswKyVNGi-ERMlAQ/edit

(3) Click on the link below for the example of the code for Q3.

https://docs.google.com/document/d/1PqUT3WSqjehsZeLF6n6XqivmqgDhaiCWdochLJwY2Zc/edit


Click on the link below for an example of the testing plan for Q2

https://docs.google.com/document/d/10hb9Z9EBkKLpde7ZuP_Fs5BLII3hGhR7jFoc_cFFQt0/edit

Click on the link below for Player Scores txt file.


https://drive.google.com/file/d/0B094zD02-dLYY3NveEpRWUtCNXM/view?usp=sharing

New GCSE Computing Python Course

Please note that this course is curently a work in progress:

https://docs.google.com/document/d/1mqifndp7CFsrSnQuKL90adZinM-InJSAc4nKJXWWlk0/edit

Don't forget the superb 'Invent With Python Book' that you can go through online:

https://inventwithpython.com/chapters/

Also, make sure that you have completed the CodeCademy Python course:

http://www.codecademy.com/en/tracks/python

Finally, 'Computer Science Circles' is another excellent online tutorial:

http://cscircles.cemc.uwaterloo.ca/



Monday 6 July 2015

Summer 2015 Work

Exam Feedback and Summer Work

6th July lesson:

Starter

1. In your notebook write a heading 'Exam Feedback'. 

2. Model of a computer system: draw the INPUT/PROCESS/OUTPUT - STORAGE

3. Data types: Please list five types of data:

4.In a database field called 'surname' give evidence two lots of test data for a type check.

5. .In a database field called 'date_of_birth' give evidence two lots of test data for a type check.

Summer Python Work

Complete Question 3 from the exemplar below and submit:

http://qualifications.pearson.com/content/dam/pdf/GCSE/Computer%20Science/2013/Specification%20and%20sample%20assessments/GCSE_in_Computer_Science_SCAM_TYPESET.pdf

2015/16

A link to a new Python Course will be posted here shortly:







Wednesday 1 July 2015

15. Pseudocode and built-in subprograms: random function






Activity 14.1
Pseudocode
Pseudocode, or ‘mock’ code, is another way of describing a program. You will need a copy of the pseudocode used in this course (Appendix B of the specification) to answer thesequestions.

What does this pseudocode do?
RECEIVE myName FROM (STRING) KEYBOARD
RECEIVE myAge FROM (INTEGER) KEYBOARD
SET AgeInTen TOmyAge + 10
SEND myName “will be” AgeInTen “in 10 years time” TO DISPLAY

Write the Python code for this program.
Activity 14.2
What does this pseudocode do?
SET score TO 119
IF score < 50 THEN SEND “You have lost” TO DISPLAY
ELSE SEND “You have won” TO DISPLAY
END IF

Write the Python code for this program.
Activity 14.3
random() function
Copy and run this program code:

Run the program a few times. What does it do?
What is meant by ‘import random’?
What happens if you alter the values to 1, 100?
Activity 14.4
Write a program that acts like a dice. After each ‘throw’ of the dice it should ask if the playerwishes to continue and stop when they enter ‘Y’.
Activity 14.5
Write a program that gives the user 10 chances to guess a number between 1 and 10. It then compares their answer with a randomly generated number and stops the program when the number generated matches the number guessed or when the user is out of guesses.

14. Repetition construct: while loop, flowcharts






Activity 13.1
While command
What does this while command do?
What is the condition that is being tested and how does it change?
Activity 13.2
Write a program that asks the user if they are hungry. While they reply ‘N’ the program repeats the question, showing how many times they have replied ‘N’.  
When they reply ‘Y’, the program tells them to get something to eat.
Activity 13.3
What does this program do?
What is the ‘sentry’ variable?
What is the condition?
Activity 13.4
Flowcharts and while command
Flowcharts can be used to represent programs. Complete the flow chart for this program.