Intro to Programming - Python

ModuleTopics Programming Skills
Talking to your ComputerWriting a simple program
  • Print a string
  • Recognise a syntax error
  • Store things in variables
  • Read input from the user
Calculating ThingsPython as a calculator
Data types
  • Use mathematical operations (+ - * / **)
  • Use strings
  • Find the length of a string
  • Convert between numbers and strings
  • Print out numbers and strings
Making DecisionsMaking decisions with if statements
Conditional operators
  • Use the if/elif/else control structure
  • Understand the difference between assignment and comparison
  • Make numerical comparisons using (> < = != >= <=)
  • Use nested if statements
Manipulating StringsUsing and changing strings of characters
  • Check for substrings within a string
  • Use strings in conditional expressions in if statements
  • Change the case of a string
  • Replacing parts of a string
Repeating thingsUsing for loops
for loops
  • Loop over the characters in a string
  • Loop over a range of numbers
  • Printing output from a loop on one line
  • Sum numbers using a loop
Storing lists of valuesNumerical data types
String slicing
  • Understand the difference between floats and integers
  • Convert between floats and integers
  • Maths module
  • Use slicing to extract a substring from a string
  • String methods: startswith, endswith, strip
Looping in the unknownMore Looping
  • Looping while something is true: while loops
  • Using counters to step in loops
  • Infinite loops
  • Reading multiple lines from the user
  • Looping over characters
  • Factorisation: worked example
Looping and listsLists
  • Access and modify elements in a list
  • Sort and reverse a list
  • Create a list to store multiple values
  • Loop while a condition is true
  • Use while loops to loop over a range of numbers
  • Identify an infinite loop
  • Use a while loop to read input from the user