zip, 168.8 KB
zip, 168.8 KB

Python Resource Pack 2 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 Pack 1. It is suitable for teaching Python in schools from Year 7 onwards, tutors and learners in adult learning classes or for the hobbyist learning at home.

The pack also encourages the learner to start to consider the whole system life cycle and program documentation by including a requirement for all testing (both unsuccessful and successful tests, together with any corrective actions) to be recorded as a part of the solution alongside the code. Some of the tasks also require preparatory design before attempting to code the solution to the challenge.

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:

  • A pdf file with five coding challenges.
  • Fully commented example solutions to each of the challenges.

The following topics are introduced:

  • Combining individual instructions into more complex instructions.
  • The .format command as an alternative to the str command when concatenating strings with numbers.
  • The import command to access specialised commands in addition to the basic Python command set.
  • The math.fmod command to perform modulo division (finding the remainder).
  • The .upper() command to convert text to all capitals and its help with data entry verification.
  • The use of logical or.
  • The if… elif… else command for multiple options in a selection command.
  • The use of functions to segregate programs and generate and return data.
  • The random.randint command to generate random integers.
  • Using while True to create endless loops.
  • The .lower() command to convert text to all capitals and its help with data entry verification.
  • Use of the comma to concatenate and space integers and strings.

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

The challenges:

  • Input how many integers are to be added together. Input and add that many integers and display the sum with an informative message.
  • Input a month name and output how many days are in that month, taking leap years into consideration.
  • Write a dice rolling game according to the given rules.
  • Write a Rock, Paper, Scissors game.
  • Write a Rock, Paper, Scissors, Lizard, Spock game.

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.