Hero image

Mr King's Code Shop

Average Rating4.00
(based on 8 reviews)

Resources and activities for python and javascript.

Resources and activities for python and javascript.
The 'Pyrate' Game
ClassimagoClassimago

The 'Pyrate' Game

(1)
The “Pyrate” Game: A python script for playing “The Pirate Game” For use with worksheets by Paul Collins. Getting Started Requires python to be installed on your computer. Simply extract the file from the compressed folder and double click to run. The script can also be run through python IDLE. Playing the Game Press enter to start when prompted. The script will generate a random coordinate each turn. Coordinates will not be repeated during the game. If required, you can choose the next coordinate by pressing 1 and enter when prompted. The script will check the coordinate you have entered to prevent duplicates, and the turn number will be updated accordingly. Pirate-themed ASCII art will be displayed randomly throughout the game. Press enter after the Game Over prompt to end the game.
Python: strings, numbers, bools and lists
ClassimagoClassimago

Python: strings, numbers, bools and lists

(0)
Automatically checked python coding challenges for strings, numbers, booleans and lists. For use as formative or summative assessment in your lessons. To use the test script, simple run test.py in IDLE or the command line interface of your choice. The tests will fail at first. To get them to pass, complete the return statements in the files found in the python-introduction. The answers are included in a separate folder and instructions are available on a handout. for example: def say_hello(string): return Should be: def say_hello(string): return 'Hello, ' + string + '!'
Python Strings Interactive Tests
ClassimagoClassimago

Python Strings Interactive Tests

(1)
Automatically checked python coding challenges. To use test script simple run test.py in IDLE or the command line interface of your choice. The tests will fail at first. To get them to pass, complete the return statements in src/strings.py. The answers are included in a separate folder, with the surrounding test framework so you can see what the test look like when they pass. for example: def say_hello(string): return Should be: def say_hello(string): return 'Hello, ' + string + '!'