MENU

Fun & Interesting

GCSE Python Skills - Lists, Files and Loops

Billy Rebecchi 357 7 years ago
Video Not Working? Fix It Now

In this video we go over part 1 and part 2 of the first Python skill up challenge. To view my code visit: https://github.com/thebillington Download the challenges document here: http://thebillington.co.uk/downloads/year11skills/skillUpFilesListsLoops.docx In section 1 we take a look at the commenting challenge and discuss each line of the code in detail. In section 2 we then analyse the code with errors, fix it and discuss how each of the errors affect our code. Key terms and phrases: open - A python function that gets a file ready for us to read or write. read - A python function that reads the data from a file in as a string. split - A python function that allows us to split a string up into a list, based on a certain character e.g splitting a sentence up into separate words, based on the space character list - A data structure in python that allows me to store multiple pieces of information. I store a list in a variable, and then multiple pieces of data inside the list. Sequence - Running instructions in the correct order. Selection - Making decisions in our algorithm. In python, we use if statements to make a decision. Iteration - Repeatedly running code either a certain number of times, or until a condition is met. format - A python function that allows us to put information into a string. Type - Describes what information is stored in a certain variable. At it's simplest level, this tells the computer whether my data is a number or text. Integer - A whole number. A type of information. String (literal) - Stores alphanumeric (letters, numbers and punctuation) characters. A type of information. Tuple - An immutable data structure which holds multiple pieces of information. Immutable means that data can't be changed, added to or deleted from the structure.

Comment