zip, 1.79 MB
zip, 1.79 MB

Python Resource Pack 6 is a set of coding challenges designed to support the teaching and learning of the Python programming language.

This pack is designed for those who have some experience of programming in Python, such as completing the exercises in Resource Packs 1 - 5. It is suitable for teaching Python in schools at GCSE, AS and A Level, for tutors and learners in adult learning classes or for the hobbyist learning at home.

As part of the higher-level learning and exam preparation for which the pack is designed, emphasis is placed on the system life cycle and program documentation by requiring:

  • Preparatory design before attempting to code the solution to the challenge.
  • Full validation to prevent the wrong type of data or incorrect values from being entered.
  • The use of meaningful names for variables, functions and procedures.
  • Fully commenting code.
  • Full testing (both unsuccessful and successful tests, together with any corrective actions) to be recorded as a part of the solution alongside the code.

The pack is designed to support learning that has previously taken place in the classroom, via self-directed study, or by following tutorials.

The pack contains eleven challenges, each consisting of:

  • A pdf file with one or more coding challenges and, in some cases, supplementary extension work.
  • Fully commented example solutions to the challenge or challenges and any extensions.

The following topics are introduced:

  • Writing recursive as opposed to iterative solutions.
  • The global command to create static variables.
  • The round command to round numbers to a given degree of accuracy.
  • The use of end= in print commands.
  • The % mathematical operator to perform modulo division.
  • The** .append()** command with lists.
  • The ** function for calculating exponents;
  • The math module;
  • The import math command.
  • The math.degrees() command to convert from radians to degrees.
  • The math.asin() command (the equivalent of sin-1)
  • The math.pi() command representing π.
  • The math.sin() command.
  • The math.cos() command.
  • The in command for checking if an item is in a list.
  • The pass command in error trapping.
  • The match… case command to make selections based on the value of a variable.
  • The not in command to search for strings within strings.
  • The use of constants and a constants file.

The challenges are designed so that self-directed research will be required to complete them; they are not a cut-and-paste tutorial.

The challenges:

  • Calculate factorials. Includes extension work.
  • Temperature scale converter.
  • Fibonacci Sequence. Includes extension work.
  • Perfect Numbers.
  • Problems inspired by Isambard Kingdom Brunel.
  • Platonic Solids.
  • Happy Numbers.
  • String interrogation. Includes extension work.
  • Counting game. Includes extension work.
  • Kaprekar and Harshad Numbers. Includes extension work.
  • Thue-Morse Sequence.
  • Palindromes.
  • Number Base Converter.

Get this resource as part of a bundle and save up to 20%

A bundle is a package of resources grouped together to teach a particular topic, or a series of lessons, in one place.

Reviews

Something went wrong, please try again later.

This resource hasn't been reviewed yet

To ensure quality for our reviews, only customers who have purchased this resource can review it

Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.