More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard
Tag: 2D Array

Pacman – Pac-dots Randomiser

In this challenge, we are looking at using a 2D Array to create the maze used in a Pacman Game. Our 2D array will contains different numerical values to represents the corridors, walls and the pac-dots: So in our 2D-array

Laser Maze Game in Python

In this Python programming challenge, we are going to recreate the game “Laser Maze”. The aim is to redirect a laser beam across a given stage in order to reach the exit gate of the stage. The laser can only

A Python game of Noughts and Crosses

In this blog post, we will focus on using a 2D array to create a 3×3 game of noughts and crosses. We will investigate the code using a step by step approach. You can follow the steps described below and

2D Dice Grid Scoring Algorithm

This challenge is based on a 4×4 grid of dice (16 dice in total). Each game starts by shaking the grid to generate a new grid of 16 values. All dice are 6-sided dice, generating random values between 1 and

Diagonal Difference Calculator

Let’s consider a square matrix of n x n. (n columns and n rows). The diagonal difference of a square matrix is the absolute difference between the sums of its diagonal. Let’s look at an example based on the following

Level generation using a 2D array

In this post we will investigate how to generate a level/stage for a platform game using a 2D array. We will focus on the level for a 2D platform game such as Super Mario: By applying a grid layout to

Shuffling a 2D Array

For this challenge we will investigate how to create a 2D array to store the value from 1 to 100 in a 10×10 array. We will then write an algorithm to shuffle the content of this array. See the code

Boggle Challenge

Boggle is a word game based on a 4×4 grid of 16 letters. Each time the game is played a new grid is generated. In the real game this is done by shaking a cube that contains 16 letter dice.

My Weekly Timetable

A school timetable is displayed as a 2D table consisting of 5 rows (for each day of the week) and 5 columns (number of lessons in a day). Such a table can be stored in a computer program using a

Four-in-a-row challenge!

In this blog post you will use Python Code to complete this simulation of the game of connect 4. (Rules of the game) You will first need to reverse-engineer the code provided. The code so far is used to: Display

Privacy Overview

This website will store some information about your preferences on your own computer inside a tiny file called a cookie. A cookie is a small piece of data that a website asks your browser to store on your computer or mobile device. The cookie allows the website to remember your actions or preferences over time.

You can delete all cookies that are already on your computer, and you can set most browsers to prevent them from being placed. However, if you do this, you may have to manually adjust some preferences every time you visit a site, and some services and functionalities may not work.

Most browsers support cookies, but you can set your browser to decline them and can delete them whenever you like. You can find instructions here for how you can do that on various browsers.

This website uses cookies to:

  1. Identify you as a returning user and to count your visits in traffic statistics analysis
  2. Remember your custom display preferences (such as light/dark theme option)
  3. Provide other usability features, including tracking whether you have already given your consent to cookies

Enabling cookies is not strictly necessary for the website to work but it will provide you with a better browsing experience.

The cookie-related information is not used to identify you personally and is not used for any purpose other than those described here.

There may also be other types of cookies created after you have visited this website. This site uses Google Analytics, a popular web analytics service that uses cookies to help to analyse how users use the site. The information generated by the cookie about your use of this website (including your IP address) will be transmitted to and stored by Google on servers in the United States. Google will use this information for the purpose of evaluating your use of other website, compiling reports on website activity, and providing other services relating to website activity and internet usage. Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google’s behalf. Google undertakes not to associate your IP address with any other data held by Google.