# data[].attributes.attachment_link.title
GitHub - karan/Projects: A list of practical projects that anyone can solve in any programming language.

# data[].attributes.attachment_link.description
A list of practical projects that anyone can solve in any programming language (See solutions). These projects are divided in multiple categories, and each category has its own folder. To get started, simply fork this repo. See ways of contributing to this repo.

# data[].attributes.attachment_link.readable_text
So you know a little bit about programming (perhaps you've read the free book, "Invent Your Own Computer Games with Python", a free programming book for beginners whose author shamelessly plugs at every chance) but you want to get better at coding. You can't seem to find any open source projects that are at your level or easy for new people to contribute to. You've gone through a few of the practice problems at Project Euler but you want to create something more substantial, or at least a cool thing you can show your friends. (Not that finding the 31337th prime number isn't cool.)

Here's a list of game clone ideas for you to implement. Each has a short description of the game, links to videos of the game, and descriptions of what kind of algorithms you'll need to know in order to implement them. These games have been selected for their simplicity, so you don't have to spend several weeks designing art, levels, scripted dialogue, or complicated AI. These are clones designed to be doable in roughly a weekend. A Mario or Zelda clone would be complicated to put together, but a Tetris or Asteroids clone would be doable in a weekend.

Orisinal Games:

The Orisinal website has a great collection of Flash games with very simple mechanics that can be copied. http://www.ferryhalim.com/orisinal/

I especially recommend Winter Bells, A Daily Cup of Tea, Bugs, and Hold the Rope!

The Wikipedia entry for video game clones also lists some ideas.

UPDATE: If you'd like to make some more advanced games, I highly recommend you watch the talk Juice it or lose it - a talk by Martin Jonasson & Petri Purho on some simple tweaks and tricks that turn a simple pong game into a really polished looking pong game.

Games from "Invent Your Own Computer Games with Python" and "Making Games with Python & Pygame" books:

These games are described in these free Python programming books and their source code is available. However, you can make your own variants.

1. Dodger

Description: Several bad guys fall from the top of the screen, and the user must avoid them. The player can be controlled with the arrow keys or more directly with the mouse. The longer the player lasts without being hit, the higher the score.

Variations: Have enemies fall at different rates and be different sizes. Have enemies fall from more than one side of the game. Have power up pickups that grant invulnerability for a while, slow down bad guys, give the player a temporary "reverse bad guys" power, etc.

This game is covered in Chapter 20 of "Invent with Python"
Download Source: dodger.zip
2. Memory Puzzle

Description: A board full of overturned cards. There is a pair for each card. The player flips over two cards. If they match, then they stay overturned. Otherwise they flip back. The player needs to overturn all the cards in the fewest moves to win.

Variations: Provide "hints" in the form of four possible matching cards after the player flips the first one. Or, quickly overturn groups of cards at the beginning of the game.

This game is covered in Chapter 1 of "Making Games with Python & Pygame"
Download Python Source: memorypuzzle.py
3. Sliding Puzzle

Description: A 4x4 board of numbered tiles has one missing space and is randomly set up. To win the game, the player must slide tiles over to put the tiles back in order.

Variants: Instead of numbers, you can have a scrambled picture cut up into 4x4 tiles.

This game is covered in Chapter 4 of "Making Games with Python & Pygame".
Download Python Source: slidepuzzle.py
4. Simon

Description: Four colored buttons light up in a specific pattern. After displaying the pattern, the player must repeat the pattern by clicking the buttons in proper order. The pattern gets longer each time the player completes the pattern. If the player presses a wrong button, the game ends.

Variant: A nine-button version can add challenge to this game (but more than that would probably just be tedious.)

This game is covered in Chapter 5 of "Making Games with Python & Pygame".
Download Pyhton Source: simulate.py
5. Nibbles

Description: A worm or snake constantly moves around the board. The player controls the direction the "head" of the worm moves, and the worm must try to eat apples that randomly appear. Eating an apply causes the worm to grow in length. The game ends if the worm crashes into the edge of the board or into itself.

Variants: Add walls to the level, instead of just a blank rectangle. Add power ups that the worm can pick up. Add bad guys that move around the board that the worm must avoid. Have two worms that the player must control simultaenously. Tron (see below) is a two-player variant of this game.

This game is covered in Chapter 6 of "Making Games with Python & Pygame".
Download Python Source: wormy.py
6. Tetris

Description: Shapes made up of four blocks fall from the top of the board. The player must rotate and place them to create full rows with no gaps. When a full row is made, the blocks in that row disappear and the blocks above it move down. The game ends if the board fills up.

Variant: Several Tetris variants are listed on Wikipedia. http://en.wikipedia.org/wiki/List_of_Tetris_variants

This game is covered in Chapter 7 of "Making Games with Python & Pygame".
Download Python Source: tetromino.py
7. Katamari Damacy

Description: The original Katamari Damacy game was in a 3d world, but a 2d version is also easy to implement. The player controls a small object in a world of different-sized objects. Touching the smaller objects grows the player, touching the larger objects damages or shrinks the player. The player wins when they reach a certain size.
A flash version of 2D Katamari is available.
This game is covered in Chapter 8 of "Making Games with Python & Pygame"
Download Source: squirrel.zip
8. Sokoban

Description: The player is in a level with objects that need to be pushed over goals. The objects can only be pushed, they can't be pulled. This game does require some effort to design levels for, but Sokoban levels have been designed by others and published on the web.

Variant: Add all sorts of level gimmicks: teleport tiles, conveyor belts, buttons that open doors/bridges, buttons that need an object left on them to keep a door open.

This game is covered in Chapter 9 of "Making Games with Python & Pygame".
Download Source: starpusher.zip
9. Othello

Description: On a grid, a black and white player places tiles of their color on the board. The opponent's tiles between the newly placed tile and that player's existing tiles are flipped to become the color of the player's tiles. The game ends when the board fills up and the player with the most tiles of their color wins.

Variant: Three player Othello with three different colors. Non-square boards.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".
Download Source: flippy.zip
10. Flood It

Description: A grid of six colors of tiles starts off randomly. The player can do a "flood fill" on the top left tile, changing the color of any adjacent tiles of thesame color. The player wins if they are able to make the entire board a single color within a certain number of moves.

Variants: Power ups gained when a certain tile is changed.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".
Download Source: inkspill.zip
11. Connect Four

Description: Two players of different colors drop their tokens on an upright board. The player to make four tokens in a row, column, or diagonal wins. Creating an AI for this requires a simple minimax algorithm.

Variant: Different board sizes. Walls inside the board that appear when the spaces beneath them are filled.

This game is covered in Chapter 10 of "Making Games with Python & Pygame".
Download Source: fourinarow.zip
12. Bejeweled

Description: The board is filled with seven different types of jewels. The player can swap two adjacent jewels to form a three-in-a-row, causing the jewels to disappear and the jewels on top of them to fall down. Creating chain reactions gives bonus points.

Variant: Different power ups for matching a particular jewel. Be able to sometimes swap jewels that are not adjacent to each other. Timed games.

The original Bejeweled game and its sequels are at http://www.bejeweled.com/

This game is covered in Chapter 10 of "Making Games with Python & Pygame".
Download Source: gemgem.zip
Board Games:

Board games are a good source for game clone ideas. A game like Monopoly has far too many rules to put together in a short time frame, but here's a list of board games that have simple mechanics. Chess, Go, and Stratego may be too complicated to create an AI opponent, but in that case you can just make it a two-player game. These games don't really have variants,

13. Mancala

YouTube video showing gameplay. Mancala rules

Description: A stone capture game where the board is made up of 12 pits and a "score pit" that the player tries to move their stones into. A simple minimax algorithm can be used by the AI.

Variants: Wikipedia has a list of "mancala games".
Source code for Awale, a Mancala variant.
14. Tic-tac-toe
Wikipedia page explaining rules.
Description: Players put down their X or O symbol on a 3x3 board and try to get three in a row.

Variants: Using a 3x3x3 board for 3D Tic-tac-toe. Wikipedia has a list of variations.

15. Quarto

Quarto rules YouTube video explaining the rules

Description: Two players take turns setting one of the 16 pieces which is either: tall/short, light/dark, square/circular, and hollow/solid. The goal is to get four in a row of a common trait.

Variants: You can increase the board size and the number of types of pieces.

16. Abalone

Wikipedia page with game rules. YouTube video explaining the rules.

Description: Players move their marbles around a hexagonal board, trying to be the first to push six of the opponent's marbles off the edge of the board.

17. Quoridor
YouTube video explaining the Quoridor rules
Description: Two players try to move their token to the other side of the board. On their turn, they can either move their token one space or place a wall on the board. A player cannot completely seal in the other player with a wall. An AI for this game may be too complex, but a two-player version should be simple to implement.

Variants: See Minotaurus, the next game.

18: Minotaurus
YouTube video showing gameplay.
Description: This game is essentially a more complex and multiplayer version of Quoridor, with a "Minotaur" monster added in that can attack players.

Variants: Add different level/wall designs instead of the standard board. Add teleports, or buttons that can activate doors and bridges.

19: Stratego

YouTube video explaining the rules and demonstrating gameplay. Wikipedia page explaining rules.

Description: Two players set up army units on the board and try to determine the strength of their opponent's units. Disinformation is an important aspect of the game.

20: Blackjack
Rules of Blackjack
Description: Blackjack is a classic card game that is simple enough to implement a dealer AI for.

Variants: Variants of Blackjack are listed on the Wikipedia page.

21: Scrabble
YouTube video explaining the rules
Description: Player form words from letter tiles on a board. Rare letters are worth more points. Some spaces on the board give letter or word bonuses. You will need a dictionary file for this program, which you can download from http://wordlist.sourceforge.net/.

Variants: There are too many to list here. See the Wikipedia entry for Scrabble Variants.

22: Grid Lock / Traffic Jam
YouTube video showing gameplay.
Description: The player must slide a target car through an exit, but other cars are blocking the way. Cars can only be moved vertically or horizontally depending on their starting orientation. Level designs can be copied from existing games.

23: Yahtzee
Yahtzee rules explained.
Description: Dice rolling game where the players try to achieve specific patterns of rolls.

Variants: Variants are listed on the Wikipedia page.

24: Risk
YouTube video of Dicewars gameplay.
Description: Each territory has a certain number of armies which can be used to attack adjacent territories. The player can attack as often as they want, but conquering too many territories stretches out their troops so that the territories can be reclaimed easily. Additional armies are given based on conquered territories, so not expanding fast enough will also lead to losing. A straight forward AI is relatively easy to produce.

Variants: Dice Wars is a high-speed Flash game that is similar to Risk.

25: Checkers / Draughts
YouTube link of a Checkers game.
Description: A player moves their pieces diagonally on a board and tries to "jump" the opponent's pieces.

Variants: Some variants are listed on the Wikipedia page for Draughts.

26: Chess

Description: Chess is a classic game, and the rules are explained on Wikipedia.

Variants: Some variants are listed on the Wikipedia page for Chess Variants.

27: Go

Rules explained YouTube video show

Description: Players take turns laying down stones and try to capture areas of the board. See the rules for full details. Even simple Go-playing AIs require deep levels of knowledge, but a two-player game is easy to create.

Action Games:

28: Asteroids
YouTube video showing gameplay
Description: The player rotates a ship to shoot asteroids, which break into two smaller asteroids when hit. The player must avoid being hit by the asteroids which slowly move around the screen. The player has no brakes, and can only slow or stop by using thrust in the opposite direction they are traveling.

Variants: Having different weapons and an occasional UFO that shoots directly at the player.

29: Space Invaders
YouTube video showing gameplay
Description: A few rows of enemies gradually makes they're way down to the player. The player must shoot them all before they reach the bottom.

30: Tron
YouTube video showing gameplay
Description: Players control a constantly moving object that leaves a trail of walls behind it. The player who avoids crashing into a wall longest wins.

Variants:

31: Missile Command
YouTube video showing gameplay
Description: Missiles are shot up from the ground to hit falling meteors before they hit cities. The missiles must be timed so that they reach their target at the same time that the meteor is there.

Variants: See Rampart below. Different weapon types (the kind used in Scorched Earth) are also possible.
Python source code
32: Pong
YouTube video showing gameplay
Description: A tennis game where players bounce a ball passed the other.

Variants: Several of the same variations found in Arkanoid can be used in Pong. Obstacles can be placed on the map instead of just an open field.

33: Arkanoid
YouTube video showing gameplay
Description: The player controls a paddle that bounces a ball off of bricks in the level. The bricks break when the ball bounces off of them. The level is cleared when all the bricks are destroyed.

Variants: Power ups fall from smashed blocks, including: triple ball, longer paddle, ball breaks through bricks, a laser shoots out from the paddle.

Python source, another Python source, and another, and another.

34: Maze
Wikipedia entry on Maze Generation Algorithms
Description: Player runs through a maze to the exit. This is more of an exercise in writing maze-generation algorithms.

Variants: Teleports, buttons to control doors, keys to unlock doors, having multiple characters to move around that must work in sync to unblock each other's paths.

Python source code, and another.

35: Scorched Earth / Worms / Gorillas / Angry Birds
YouTube video showing gameplay
Description: Players control tanks on a 2D hilly terrain and enter the numeric angle and velocity of a cannonball shot. The object is hit the other player's tanks.

Variants: Angry Birds is a version of this game that adds a physics engine instead of hills. Different weapon types besides the standard cannonball can be added. Several UI improvements can be made over the original game (using the mouse to enter the angle and velocity, displaying the previous turn's angle and velocity, etc.) Destructible terrain and being able to move the tanks adds a new dimension to the game.

36: Lunar Lander
YouTube video showing gameplay
Description: The player controls a ship that must gently land on a flat surface of the moon. The ship has limited fuel, and using the thrusters affects the momentum of the ship (much like Asteroids).

37: Snood / Bust-a-Move

YouTube video showing gameplay of Snood YouTube video showing gameplay of Bust-a-Move

Description: The top of the board is filled with different colored bubbles. The player must shoot bubbles from the bottom to form a set of three bubbles of the same color in a row to make them disappear. The ceiling lowers over time. The player wins if the board is cleared of bubbles, and loses if the bubbles reach the bottom.

Variants: This is a similar game to Bejeweled, and the power ups used in that game could be used in this one.

38: Fruit Ninja
YouTube video showing gameplay
Description: Objects are thrown up over the screen and the player must drag the mouse over them.

Variants: Bonuses for combos. Some objects cause the player to lose if they are touched.

39: Last Stand
Link to the original Flash game
Description: On each round, a wave of zombies attacks a barricade while the player shoots from behind it. Several shots are needed to kill a zombie and accuracy counts. When the zombies reach the barricade they begin to damage it. The player loses if the barricade is destroyed. After each round, the player can spend actions on finding new weapons, finding other survivors to help defend, or repairing the barricade.

Variants: Different zombie types (armored, fast moving-dog zombies, etc.) and weapons can be used (mines, grenades, traps).

40: Duck Hunt
YouTube video showing gameplay
Description: Ducks fly around the screen and the player must click on them to shoot them. The player has limited ammo.

Variants: The flight patterns of the ducks/objects can be changed.

41: Rampart
YouTube video showing gameplay
Description: The player alternates between building fortifications (to house cannons) and shooting at incoming ships. This game is similar to Missile Command, with a building mechanic added in.

Variants: Different enemy types (slow moving, armored ships or fast moving airplanes) and weapons can be added. Add different strength walls to build.

42: Bloxorz
YouTube video showing gameplay
Description: A puzzle game where the player must roll over a 2x1 brick to an exit point on the map. The brick cannot be moved off the edge of the board, and since it can only be flipped end over end and not slid around, the 2x1 nature restricts the types of moves it can make.

43: Dr. Mario
YouTube video showing gameplay
Description: A Tetris-like game where two-colored pills fall on different colored germs. Forming four in a row of the same color germ/pills causes them to disappear. The player wins when all the germs are cleared from the board, and loses if the pills fill up the board.

Variants: Similar to Puyo Puyo.

44: Kirby's Avalanche / Puyo Puyo

YouTube video showing Kirby's Avalanche gameplay Wikipedia entry for Puyo Puyo

Description: Essentially like a two-player Dr. Mario without the germs.

45: Fire 'N' Ice
YouTube video showing gameplay
Description: A very original but obscure puzzle game on the NES. The player controls a wizard who can make and unmake ice cubes, which need to fall on all the fire in a level to clear it. The ice can also be used as platforms, and individual blocks of ice can be pushed around. (As a platformer, making a clone of this might be a bit more involved. But the concept is original enough where I think it'd be worth the effort.)

46: Typespeed
YouTube video showing gameplay
Description: A typing game where words slowly move to the right side of the screen. The player must type the word to make them disappear. The player loses after enough words hit the right side of the screen.

47: Diner Dash
YouTube video showing gameplay
Description: A game where several different tasks in sequence must be managed simultaneously. Diner Dash has a restaurant theme, but other themes could be applied.

Variants: Usually there are ways to streamline tasks by doing them in a certain order (e.g. the player can carry meals for two tables at the same time).

48: Pipe Dream
YouTube video showing gameplay
Description: The player must put down different shaped pipes on the board. The pipes cannot be rotated or moved after placement, but the player does get to see the next several pipes that will be used. A little after the start of the game, water begins to flow through the pipes.

49: Zoop
YouTube video showing gameplay
Description: Colored bubbles begin to appear from four sides of the board. The player can assume the color of the bubbles, and then destroy bubbles of a similar color. The game ends if the bubbles fill up one side of the board.
Learn to program for free with my books for beginners:

# data[].attributes.attachment_link.title
"I Need Practice Programming": 49 Ideas for Game Clones to Code

# data[].attributes.attachment_link.description
So you know a little bit about programming (perhaps you've read the free book, "Invent Your Own Computer Games with Python", a free programming book for beginners whose author shamelessly plugs at every chance) but you want to get better at coding.

# data[].attributes.attachment_link.readable_text
After learning the basics of programming, the typical advice is to start making programs yourself, to further your learning. At some point, you've got to stop doing exercises and start making real software.

But what should you make? When you're a beginner, it's not always obvious what is possible to make, let alone what is achievable at your current skill level.

In this article, I'm going to look at some beginner-friendly project ideas.

Stick to Text-Based Programs, for Now

For beginners, text-based programs are the most achievable type of software to create.

I know, it's tempting to try make a 3D game, or a nice polished GUI like you're accustomed to using. The problem is that nice GUIs are usually really hard to create. 3D graphics programming is even harder, because it requires some advanced mathematical concepts.

If you've got the inspiration, do try to make a GUI or a 2D game. If you enjoy it, keep going. If it's overwhelming and unenjoyable, stick to making text-based programs for a while longer. Once you have a good understanding of data structures, control flow, and the features of your chosen programming language, you can attempt to tackle something more complicated.

Text-based programs can still be fun! Here is a text-based program that runs Conway's Game of Life:

You might be thinking that nobody actually uses text-based programs. This is true for the average computer user, but professional programmers tend to use a lot of text-based programs. Some programmers will spend the majority of their workday using a command-line interface (CLI), running text-based programs. In fact, this website and the Programming for Beginners book were both created in Vim, a command-line text editor.

Make Something You Can Use at Work or School

Ideally, you want a project that you (or someone else) will actually use. This will give you the full software development experience - from analysing requirements to user testing, and maintenance. You'll be more motivated to complete the project too, if it's going to actually be useful to you.

At work, the types of useful programs you could make depends on what your job is. Anything that involves repetitive manual steps on a computer can be automated - number crunching, moving files around, sending email, that sort of thing. Al Sweigart has a great book called Automate the Boring Stuff with Python about this topic, which you can read online.

If you're a student, you could write a program to solve your math homework. It's more interesting than doing sums manually. If math isn't your thing, you might enjoy making a flashcard program or a quiz, to help with your studies. If your area of study is more artistic, maybe try a random text generator for inspiration. Pick words at random from a list, and slot them into a sentence like "The X in Y":

The woman in a car

The cat in the toilet

The ballet teacher in Poland

The drama in the dewdrop

If you're really stumped for programming ideas, try making something generic like a to-do list manager.

Make a Game

If you can't think of anything that would be useful, or if you just want to make something fun, try making a game. Some people find it motivating to have complete freedom in their programming projects, and making a game gives you that freedom.

The beauty of programming a game is that it can be adjusted to fit your situation. It can be simple or complicated, depending on your skill level. It can be long or short, depending on how much time you put into it.

Try to make a text adventure. For inspiration, have a look at A Dark Room. It is a very poplar, mostly text-based game.

Try making a quiz, or a choose-your-own-adventure type of story. This is a nice and simple project that you can get other people to play.

You can even make simple 2D graphics with text, like the Game of Life example from earlier in the article:

As your programming skill level increases, you can start making 2D games. Learn to use a very simple 2D graphics library, like Gosu, Processing, or Pygame, and it will open up a whole new world of possibilities.

Projects I Made as a Beginner

In high school I would make short quizzes for my friends, that would accuse them of various things (which I won't repeat here).

I made a random insult generator, which would come up with things like "stupid chicken sniffer" and "super idiot breath."

I made a chat program so that we could talk to each other in class. It didn't work properly half the time, because it was made very badly, but we still used it for a while.

Later I made a program I called the "helpful virus." It wasn't really a virus. It just pressed the F1 key every ten seconds, which would bring up the help window. I put this program on the public drive and called it "porno.scr", and then waited for other students to run it.

I tried to make an IRC chat bot. I never got it working properly, but I did learn a lot about networking from it.

All of these projects are pretty silly, but the point is that they were interesting to me at that time. And because teenage me found them interesting, I kept writing code.

Conclusion

In the end, it doesn't really matter what project you create. As long as you're making something, you will be learning.

What's important is to find a project that motivates you. If writing the code is fun, then you'll keep writing code. Experiment with a few different types of projects to find one that suits you.

Lists of Project Ideas

Here are some links to websites that have lists of programming projects of varying difficulties.

# data[].attributes.attachment_link.title
What Should I Make? Beginner Programming Project Ideas

# data[].attributes.attachment_link.description
After learning the basics of programming, the typical advice is to start making programs yourself, to further your learning. At some point, you've got to stop doing exercises and start making real software. But what should you make? When you're a beginner, it's not always obvious what is possible to make, let alone what is achievable at your current skill level.

# data[].attributes.attachment_link.authors[].name
FREGE: A Logic Course Elaine Rich, Alan Cline

# data[].attributes.attachment_link.description
Isaac Computer Science is a free online learning platform for A level, funded by the Department for Education.

# data[].attributes.attachment_link.title
AQA A-level Computer Science Revision - PMT

# data[].attributes.attachment_link.description
Revision for AQA Computer Science AS and A-Level from 2015, including notes, flashcards, videos and past exam questions for each topic.

# data[].attributes.attachment_link.readable_text
This article may be too long or complex for new English speakers to understand. This article should be shortened and/or simplified for English beginners. )

An assembly language is a programming language that can be used to directly tell the computer what to do. An assembly language is almost exactly like the machine code that a computer can understand, except that it uses words in place of numbers. A computer cannot really understand an assembly program directly. However, it can easily change the program into machine code by replacing the words of the program with the numbers that they stand for. A program that does that is called an assembler.

Programs written in assembly language are usually made of instructions, which are small tasks that the computer performs when it is running the program. They are called instructions because the programmer uses them to instruct the computer what to do. The part of the computer that follows the instructions is the processor.

The assembly language of a computer is a low-level language, which means that it can only be used to do the simple tasks that a computer can understand directly. In order to perform more complex tasks, one must tell the computer each of the simple tasks that are part of the complex task. For example, a computer does not understand how to print a sentence on its screen. Instead, a program written in assembly must tell it how to do all of the small steps that are involved in printing the sentence.

Such an assembly program would be composed of many, many instructions, that together do something that seems very simple and basic to a human. This makes it hard for humans to read an assembly program. In contrast, a high-level programming language may have a single instruction such as PRINT "Hello, world!" that will tell the computer to perform all of the small tasks for you.

When computer scientists first built programmable machines, they programmed them directly in machine code, which is a series of numbers that instructed the computer what to do. Writing machine language was very hard to do and took a long time, so eventually assembly language was made. Assembly language is easier for a human to read and can be written faster, but it is still much harder for a human to use than a high-level programming language which tries to mimic human language.

To program in machine code, the programmer needs to know what each instruction looks like in binary (or hexadecimal). Although it is easy for a computer to quickly figure out what machine code means, it is hard for a programmer. Each instruction can have several forms, all of which just look like a bunch of numbers to people. Any mistake that someone makes while writing machine code will only be noticed when the computer does the wrong thing. Figuring out the mistake is hard because most people cannot tell what machine code means by looking at it. An example of what machine code looks like:

This hexadecimal machine code tells an x86 computer processor to add 42 to the accumulator. It is very difficult for a person to read and understand it even if that person knows machine code.

With assembly language, each instruction can be written as a short word, called a , followed by other things like numbers or other short words. The mnemonic is used so that the programmer does not have to remember the exact numbers in machine code needed to tell the computer to do something. Examples of mnemonics in assembly language include add, which adds data, and mov, which moves data from one place to another. Because 'mnemonic' is an uncommon word, the phrase instruction type or just instruction is sometimes used instead, often incorrectly. The words and numbers after the first word give more information about what to do. For instance, things following an add might be what two things to add together and the things following mov say what to move and where to put it.

For example, the machine code in the previous section (05 2A 00) can be written in assembly as:

Assembly language also allows programmers to write the actual data the program uses in easier ways. Most assembly languages have support for easily making numbers and text. In machine code, each different type of number like positive, negative or decimal, would have to be manually converted into binary and text would have to be defined one letter at a time, as numbers.

Assembly language provides what is called an abstraction of machine code. When using assembly, programmers do not need to know the details of what numbers mean to the computer, the assembler figures that out instead. Assembly language actually still lets the programmer use all the features of the processor that they could with machine code. In this sense, assembly language has a very good, rare trait: it has the same ability to express things as the thing it is abstracting (machine code) while being much easier to use. Because of this, machine code is almost never used as a programming language.

When programs are finished, they have already been transformed into machine code so that the processor can actually run them. Sometimes, however, if the program has a bug (mistake) in it, programmers will want to be able to tell what each part of the machine code is doing. Disassemblers are programs that help programmers do that by transforming the machine code of the program back into assembly language, which is much easier to understand. Disassemblers, which turn machine code into assembly language, do the opposite of assemblers, which turn assembly language into machine code.

An understanding of how computers are organized, how they seem to work at a very low level, is needed to understand how an assembly language program works. At the most simplistic level, computers have three main parts:

1. main memory or RAM which holds data and instructions,

2. a processor, which processes the data by executing the instructions, and

3. input and output (sometimes shortened to I/O), which allow the computer to communicate with the outside world and store data outside of main memory so it can get the data back later.

In most computers, memory is divided up into bytes. Each byte contains 8 bits. Each byte in memory also has an address which is a number that says where the byte is in memory. The first byte in memory has an address of 0, the next one has an address of 1, and so on. Dividing memory into bytes makes it byte addressable because each byte gets a unique address. Addresses of byte memories cannot be used to refer to a single bit of a byte. A byte is the smallest piece of memory that can be addressed.

Even though an address refers to a particular byte in memory, processors allow for using several bytes of memory in a row. The most common use of this feature is to use either 2 or 4 bytes in a row to represent a number, usually an integer. Single bytes are sometimes also used to represent integers, but because they are only 8 bits long, they can only hold 2 ⁸ or 256 different possible values. Using 2 or 4 bytes in a row raises the number of different possible values to be 2 ¹⁶, 65536 or 2 ³², 4294967296, respectively.

When a program uses a byte or a number of bytes in a row to represent something like a letter, number, or anything else, those bytes are called an object because they are all part of the same thing. Even though objects are all stored in identical bytes of memory, they are treated as though they have a 'type', which says how the bytes should be understood: either as an integer or a character or some other type (like a non-integer value). Machine code can also be thought of as a type that is interpreted as instructions. The notion of a type is very, very important because it defines what things can and can't be done to the object and how to interpret the bytes of the object. For instance, it is not valid to store a negative number in a positive number object and it is not valid to store a fraction in an integer.

An address that points to (is the address of) a multi-byte object is the address to the first byte of that object - the byte that has the lowest address. As an aside, one important thing to note is that you can't tell what the type of an object is - or even its size - by its address. In fact, you can't even tell what type an object is by looking at it. An assembly language program needs to keep track of which memory addresses hold which objects, and how big those objects are. A program that does so is type safe because it only does things to objects that are safe to do on their type. A program that doesn't will probably not work properly. Note that most programs do not actually explicitly store what the type of an object is, they just access objects consistently - the same object is always treated as the same type.

The processor runs (executes) instructions, which are stored as machine code in main memory. As well as being able to access memory for storage, most processors have a few small, fast, fixed-size spaces for holding objects that are currently being worked with. These spaces are called registers. Processors usually execute three types of instructions, although some instructions can be a combination of these types. Below are some examples of each type in x86 assembly language.

Instructions that read or write memory

The following x86 assembly language instruction reads (loads) a 2-byte object from the byte at address 4096 (0x1000 in hexadecimal) into a 16-bit register called 'ax':

In this assembly language, square brackets around a number (or a register name) mean that the number should be used as an address to the data that should be used. The use of an address to point to data is called indirection. In this next example, without the square brackets, another register, bx, actually gets the value 20 loaded into it.

Because no indirection was used, the actual value itself was put into the register.

If the operands (the things that come after the mnemonic), appear in the reverse order, an instruction that loads something from memory instead writes it to memory:

Here, the memory at address 1000h gets the value of ax. If this example is executed right after the previous one, the 2 bytes at 1000h and 1001h will be a 2 byte integer with the value of 20.

Instructions that perform mathematical or logical operations

Some instructions do things like subtraction or logical operations like not:

The machine code example earlier in this article would be this in assembly language:

Here, 42 and ax are added together and the result is stored back in ax. In x86 assembly it is also possible to combine a memory access and mathematical operation like this:

This instruction adds the value of the 2 byte integer stored at 1000h to ax and stores the answer in ax.

This instruction computes the or of the contents of the registers ax and bx and stores the result back into ax.

Instructions that decide what the next instruction is going to be

Usually, instructions are executed in the order they appear in memory, which is the order they are typed in the assembly code. The processor just executes them one after another. However, in order for processors to do complicated things, they need to execute different instructions based on what the data they were given is. The ability of processors to execute different instructions depending on something's outcome is called branching. Instructions that decide what the next instruction should be are called branch instructions.

In this example, suppose someone wants to calculate the amount of paint they will need to paint a square with a certain side length. However, due to economy of scale the paint store will not sell them any less than amount of paint needed to paint a 100 x 100 square.

To figure out the amount of paint they will need to get based on the length of the square they want to paint, they come up with this set of steps:

subtract 100 from the side length

if the answer is less than zero, set the side length to 100

multiply the side length by itself

That algorithm can be expressed in the following code where ax is the side length.

This example introduces several new things, but the first two instructions are familiar. They copy the value of ax into bx and then subtract 100 from bx.

One of the new things in this example is called a label, a concept found in assembly languages in general. Labels can be anything the programmer wants (unless it is the name of an instruction, which would confuse the assembler). In this example, the label is 'continue'. It is interpreted by the assembler as the address of an instruction. In this case, it is the address of mult ax.

Another new concept is that of flags. On x86 processors, many instructions set 'flags' in the processor that can be used by the next instruction to decide what to do. In this case, if bx was less than 100, sub will set a flag that says the result was less than zero.

The next instruction is jge which is short for 'jump if greater than or equal to'. It is a branch instruction. If the flags in the processor specify that the result was greater than or equal to zero, instead of just going to the next instruction the processor will jump to the instruction at the continue label, which is mul ax.

This example works fine, but it is not what most programmers would write. The subtract instruction set the flag correctly, but it also changes the value it operates on, which required the ax to be copied into bx. Most assembly languages allow for comparison instruction that do not change any of the arguments they are passed, but still set the flags properly and x86 assembly is no exception.

Now, instead of subtracting 100 from ax, seeing if that number is less than zero, and assigning it back to ax, ax is left unchanged. The flags are still set the same way, and the jump is still taken in the same situations.

While input and output are a fundamental part of computing, there is no one way they are done in assembly language. This is because the way I/O works depends on the set up of the computer and the operating system its running, not just what kind of processor it has. In the example section the Hello World example uses MS-DOS operating system calls and the example after it uses BIOS calls.

It is possible to do I/O in assembly language. Indeed, assembly language can generally express anything that a computer is capable of doing. However, even though there are instructions to add and branch in assembly language that will always do the same thing there are no instructions in assembly language that always do I/O.

The important thing to note is that the way that I/O works is not part of any assembly language because it is not part of how the processor works.

Even though assembly language is not directly run by the processor - machine code is, it still has a lot to do with it. Each processor family supports different features, instructions, rules for what the instructions can do, and rules for what combination of instructions are allowed where. Because of this, different types of processors still need different assembly languages.

Because each version of assembly language is tied to a processor family, it lacks something called portability. Something that has portability or is portable can be easily transferred from one type of computer to another. While other types of programming languages are portable, assembly language, in general, is not.

Although assembly language allows for an easy way to use all the processor's features, it is not used for modern software projects for several reasons:

It takes a lot of effort to express a simple program in assembly.

Although not as error-prone as machine code, assembly language still offers very little protection against errors. Almost all assembly languages do not enforce type safety.

Assembly language does not promote good programming practices like modularity.

While each individual assembly language instruction is easy to understand, it is hard to tell what the intent of the programmer was who wrote it. In fact, the assembly language of a program is so hard to understand that companies do not worry about people dissassembling (getting the assembly language of) their programs.

As a result of these drawbacks, high-level languages like Pascal, C, and C++ are used for most projects instead. They allow programmers to express their ideas more directly instead of having to worry about telling the processor what to do every step of the way. They're called high-level because the ideas the programmer can express in the same amount code are more complicated.

Programmers writing code in compiled high level languages use a program called a compiler to transform their code into assembly language. Compilers are much harder to write than assemblers are. Also, high-level languages do not always allow programmers to use all the features of the processor. This is because high-level languages are designed to support all processor families. Unlike assembly languages, that only support one type of processor, high-level languages are portable.

Even though compilers are more complicated than assemblers, decades of making and researching compilers has made them very good. Now, there is not much reason to use assembly language anymore for most projects, because compilers can usually figure out how to express programs in assembly language as well or better than programmers.

A Hello, world! program written in x86 assembly:

A function that prints a number to the screen using BIOS interrupts written in NASM x86 assembly. Modular code is possible to write in assembly, but it takes extra effort. Note that anything that comes after a semicolon on a line is a comment and is ignored by the assembler. Putting comments in assembly language code is very important because large assembly language programs are so hard to understand.

Michael Singer, PDP-11. Assembler Language Programming and Machine Organization, John Wiley & Sons, NY: 1980.

Peter Norton, John Socha, Peter Norton's Assembly Language Book for the IBM PC, Brady Books, NY: 1986.

Dominic Sweetman: See MIPS Run. Morgan Kaufmann Publishers, 1999. ISBN 1-55860-410-3

John Waldron: Introduction to RISC Assembly Language Programming. Addison Wesley, 1998. ISBN 0-201-39828-1

Jeff Duntemann: Assembly Language Step-by-Step. Wiley, 2000. ISBN 0-471-37523-3

Paul Carter: PC Assembly Language. Free ebook, 2001.
Website

Robert Britton: MIPS Assembly Language Programming. Prentice Hall, 2003. ISBN 0-13-142044-5

Randall Hyde: The Art of Assembly Language. No Starch Press, 2003. ISBN 1-886411-97-2
Draft versions available online Archived 2011-01-28 at the Wayback Machine as PDF and HTML

Jonathan Bartlett: Programming from the Ground Up. Bartlett Publishing, 2004. ISBN 0-9752838-4-7
Available online as PDF and as HTML

ASM Community Book "An online book full of helpful ASM info, tutorials and code examples" by the ASM Community

# data[].attributes.attachment_link.title
Assembly language - Simple English Wikipedia, the free encyclopedia

# data[].attributes.attachment_link.description
This article may be too long or complex for new English speakers to understand. This article should be shortened and/or simplified for English beginners. ) An assembly language is a programming language that can be used to directly tell the computer what to do.

# data[].attributes.attachment_link.description
Isaac Computer Science is a free online learning platform for A level, funded by the Department for Education.

# data[].attributes.attachment_link.readable_text
Computer Science at A-Level is sometimes misunderstood as being a subject where all you do is sit in front of a screen, coding away in Python, trying to build the next Google. While a lot of your time is spent staring at a computer screen, it's not just about coding.

There is a theory side to Computer Science which plays a big role in determining what grade you get at the end of your two years. Your NEA will take a lot of analysis, planning and trial and error which many students do not expect. That's why below I've provided a long list (in no particular order) of project ideas so at least one step is taken out of the equation. You can combine some of these ideas and create a Frankenstein-type project or maybe just take one and make it your own.

1. Maze Generation Software

There are many different algorithms that you could implement when programming a maze generator (like a lot). So, if you want a list on the different algorithms you could possibly implement, check out this article.

2. Rubik's Cube Solver

This is probably the hardest project idea on this entire list - in terms of the actual implementation. Creating AI that can actually learn how to solve the Rubik's cube is very, very difficult.

The good news however, is that I don't think examiners will expect you to create AI that learns how to solve the Rubik's cube entirely by itself. Therefore, if you do choose this idea, I highly recommend that you program your AI around one of the many pre-existing algorithms that have been created to solve Rubik's cubes.

In my opinion, this is the best algorithm for you to base your AI around.

3. Bird Migration Pattern Predictor

If you actually pull this one off, I would eat my foot if you didn't get top marks (an A*).

For this project, you will need to analyze how birds have migrated across the globe in the past. Then you will need to try and find correlations between migration patterns and geographic weather conditions. From this data, your program could predict future migration patterns depending on different climate changes.

I think a great start for this idea is to read into what web-scraping is and how to do it.

4. Nuclear Power Plant Meltdown Simulation

While programming this project, you would have simulate real world conditions. After you have created this Earth-like environment, you can model the effects that a nuclear power plant meltdown would have on said environment.

You could even add cities to see the affects that radiation would have on them too.

5. Supermarket Stock Management System

Supermarket's not only need to manage stock, but also staff - both of which, they have lots of. This means that there is most definitely an opportunity for you to make a complex system that could aide a supermarket.

If you do choose this, make sure you read up on how a supermarket actually operates, so the system is suitable. There's a great document that should tell you all you need to know about managing a supermarket (and a lot more).

6. Restaurant Point Of Sale (POS) System

A point of sale system is very different to a stock management system (as you would find in a supermarket). The difference is that a point of sale system is used (guess what) at the "point of sale", meaning staff will use the system at restaurant tables when taking food orders.

Therefore, you must make sure your POS system has an extremely friendly user interface, as customers don't like waiting around!

7. Chess Playing AI

I don't think I need to tell you that this is going to be challenging... Therefore, if done right, this could lead to a well earned A* for your NEA.

There are so many resources to help you develop this particular project idea online. So, whenever you get stuck, you will never be far away from help.

8. Image Recognition AI

I reckon this is probably equally as difficult as the Rubik's cube one - AKA very, very hard.

This idea should be screaming at you: "machine learning and neural networks". If it's not, there might be something wrong with you...

Neural Networks + Machine Learning = High Marks

There are loads of free online resources that will help you a ton. However, I highly recommend that you get this book off Amazon.co.uk, it is the best book on getting started with neural networks that I have ever read - just going to have to trust me on this one.

9. Evolution Simulator

This project has the potential to be seriously complicated, however, you could also make it quite simple. It all depends on what's evolving.

If you are going to simulate how animated stick figures get better at running over many generations, your program is going to be very complex. However, if you are going to simulate how a single-muscled slug can get better traveling between points as quickly as possible then it could be quite simple.

If you're even considering this project, then you should definitely check out this YouTube playlist (it's strangely satisfying watching his imaginary creatures evolve).

10. Voice Recognition AI

This project is (obviously) very similar to the image recognition project that was aforementioned. Therefore, this project too, should be screaming "machine learning and neural networks" at you.

I've never really programmed a voice recognition AI before, therefore, I can't really recommend any specific books for you to get (as I can't be certain of their quality). However, I have done a quick google search and within 5 minutes I can tell that there is shed loads of information on this topic, so on that front - don't worry.

11. Sales Order Processing System (SOP)

An SOP system should, as the name suggests, manage sales. This means it should control the majority of communications between the warehouse, sales team and the client.

Below are things that a typical SOP system could do:

Store Order History

Generate Invoices

Generate Reports

Generate Delivery Notes

Send Reminder Emails

You are tied down a bit with this project, as you do have to make sure a factory could actually use this software. However, there are still many different avenue's for you take with the types of functionality you decide to implement.

12. Poker Game

For you to do this project, you would have to be fairly confident with networking. This game would allow multiple devices to join a "table" and start playing poker with each other.

Depending on how complex you want your program to be, you could add so many extra features. I think a great extra feature for this project would be to calculate the odds of someone winning per hand. Furthermore, you could also add a computer poker player (where you could definitely implement some AI).

13. DJ Software (Can Mix Music)

This one is definitely a fun project for those of you who have an affection for music. This project would clearly require you to learn a shed load about manipulating audio files, however, if you can pull it off I think you could really make a project that is A* worthy.

You could also build a control system which could implement the software. This might cost a bit of money, but once again, it's going to make you like you really know what you're doing.

14. Interactive Circuit Builder

If you want to know what I'm on about, get the free trial of Logicly or just go on YouTube and look at a video of someone else using Logicly.

Assuming you have done that, you will know what I mean by an "interactive circuit builder". I would say that the most important aspect of this project would have to be the UI. Without a good user interface, the software would not be fit for purpose and you would definitely lose marks.

15. Quiz App

You could either make an offline quiz app or you make a much more complex client-server quiz style app. There is definitely much more opportunity to get an A* with the latter of those options.

If you decide to do a client-server model, I think a real time quiz app would work great - something (even remotely) similar to would really stand out.

16. Software for Calculating The Big O of an Algorithm

Examiners will absolutely love this one, but why?

Because in doing this project, you would be making a computer science theory topic actually come to life. Therefore, if you do this project, you are showing to the examiner that you can get a concept off paper and actually make use of it in a real situation.

Besides that, this project is amazingly complex and will certainly provide you with plenty of opportunity's for you to incorporate A* level concepts into your program.

If you have forgotten what Big O is, don't worry (you should worry a bit actually) and just go give this a read.

17. Tracking And Monitoring Global Shipping Routes

This project is going to require you to get comfortable with web-scraping and API's. You will need to be able to gather information about the global whereabouts of cargo ships frequently.

Once you have mastered the back-end tracking, you will need to think of a nice way to present the data. Maybe you could use certain programming libraries to make route representations on a global map?

18. Implementation of Machine Learning To Maximize Profits At An Airport

This could be my favorite project idea on here.

The lengths that airport companies go to when designing the layout of a particular airport is crazy. Everything is where it is for a reason: the route you take to board a plane, where you wait to board and the even where the security is. If you want more information about how airports maximize profits, check this out.

If you choose this project, I think you should do a simulation where people are represented by a particular sprite, shape or whatever you choose, and then they you follow them through the airport. After each day you could track the profits that the airport made.

Now this is where machine learning comes in... you could implement an algorithm that changes the layout of the airport each day and see if profits increase or decrease. Then the program would learn accordingly.

19. 3D First Person Shooter Game

Although many people choose to program a 2D game for their NEA, I think that programming a 3D game is just... better. Programming in 3D makes it so much easier for you to implement A* level programming techniques.

20. Implementation of AI To Model The Effects of Global Warming

Global warming is becoming an ever increasing issue in today's world - so this project certainly checks the box "assists with a real world problem".

Anyway, designing a program (using AI) that can attempt to predict what the effects of climate change are going to be on the planet is a great idea. It's complicated enough, time-consuming enough and definitely "real worldy" enough.

A great place to start with this project is to check out the currently predicted effects of climate change, which you can find here.

21. Encrypted Instant Messaging App

An instant messaging app is one thing, but an encrypted instant messaging app is a whole different thing. This project is great because it just ticks so many boxes. You will be covering encryption and client-server networking in the same project!

Before you start this project, make sure you take out the different types of encryption methods (you can find some here).

22. E-Commerce Web App

Almost every single large company out there now has an online e-commerce website. Therefore, there is going to be plenty of helpful resources out there for you to learn from.

This project will also require some encryption as you will be dealing with payment methods such as debit and credit cards, which are VERY much confidential information.

23. Fitness Monitoring App

Programming a fitness app will allow you to actually interact with the hardware that is on the phone. For example, you could have a fitness app that tracks footsteps, in which case you would need to directly communicate with the phones pedometer.

24. Virtual Flashcard App

This can be a great project, if done right.

You're going to have to get very good at databases if you do this project as a virtual flashcard app would require crap loads of them. A great example of a virtual flashcard app is (I'm sure you have head of it already).

A simple virtual flashcard app should allow a user to:

Create Folders For Different Subjects

Create Flashcards Sets For Particular Modules

Revise Flashcard Sets Effectively.

25. Public Transport Timetable App

Now, I don't mean just display a PDF image of a pre-existing bus timetable and say "finished!"...

This app should be able to perform web-scraping on live bus and train timetables and display the information is a user friendly way.

Your program could even take two postal codes and calculate the quickest way to get there using a mixture of public transport and walking. It could also return the current price for that specific journey. An example of how this can be implemented is on the Stagecoaches "Plan A Journey" page.

26. Social Networking Platform

You all know what a social networking platform is. I don't think I need to explain this one to you...

27. Physics Projectile Modelling Tool

If you are a fan of mechanics, this is your project. One of the many reasons this project is so good is because when programming it, you are forced to simulate a real world environment - in the sense that you program in gravity, terrain, air resistance etc.

Furthermore, if you were so inclined, you could very easily transform this project into a game, where you try to hit particular objects using a projectile. Angry birds is a great example of what I mean.

28. Nuclear Power Plant Management System

There's more to managing a nuclear power plant than you think. Therefore, a nuclear power plant management system can either be super simple or extremely complex depending on what you choose to implement into the system.

I highly recommend you check out this link, it tells you all about the parts of a nuclear power station and you will get a feel for what your system will be managing very quickly.

29. Weather Forecasting Software

There are many paths you could take with this particular project, so it's really down to what you decide. However, the fundamental core of this project is that you need to at least make an attempt at predicting what the weather will be like tomorrow, the day after or perhaps even a week from now.

You could implement some kind of machine learning algorithm that could compare what your weather prediction was and what the weather actually turned out to be like. From here, the algorithm could adjust the factors that went into making the prediction accordingly.

30. Air Traffic Controller AI

Air traffic controllers are essential to ensure that planes aren't going to collide when coming in or going out of an airport. However, humans tend to make mistakes - fairly regularly. Maybe an AI would always get it right?

For this project, you would have to create a model of an airport and simulate planes coming in and leaving. Your, AI would ensure that no planes crash... hopefully.

31. Interpreter For Chosen Programming Language

Interpreters convert high level language code into machine code that can be directly processed by the CPU. Furthermore, interpreters normally translate code per line, not all at once.

Although this programming project is challenging, you might struggle to incorporate some of the A* level programming concepts in your code. All I'm saying is that make sure you keep an eye on the marking criteria and don't forget why you're doing this project - to get the grades!

32. Internet Speed Tester

There's more that goes into getting an accurate assessment of your internet bandwidth than you think. Therefore, making an internet speed test is definitely complex enough.

For this project, you will need to add feature to bulk it up. You could maybe try different methods of testing internet speed then compare how accurate each of them are.

33. Secure FTP Server

FTP stands for File Transfer Protocol. So this project would basically be making software that allows devices to easily transfer files between each other. I know I've said this a lot, but, once again, this project is going to be as complex as you make it.

If you choose this project, make sure you don't just use an FTP library that does everything for you! Try and do as much as possible by yourself.

34. Software To Find The Best Online Deals

For this project, you're going to need to "scrape" all of the current prices for a particular product off their respective websites. That's the hard part. Next, you will have to present all of your various comparisons to the user in an easy-to-understand way (and give a conclusion containing where they can find the cheapest price).

A great example of this type of software is the website

35. AI Chat Bot

This project would entail you creating a program that can talk to humans as if it was a human too. If there was such thing as a perfect AI chat bot, you shouldn't be able to distinguish it from a human.

When programming this, you are going to need to be able to program in some sort of artificial intelligence that can learn from previous conversations it had with real people.

Two examples of chat bots that I have seen before are and

36. Search Engine

Examples of search engines are: Google, Bing and Yahoo. There role is to receive a query from a user and index webpages in accordance with how relevant they are to the particular query. So if you googled "what is a pineapple?", the idea is that a webpage containing information about pineapples would come up first before information about bananas.

There are many factors to consider when ranking webpages. Possible ranking factors for your SE could be:

Keyword Frequency

Title

Image ALT Tags

How Users Have Interacted With Page Previously.

37. AI Spam Filter

If you've ever been directly (or even indirectly) involved in front-end website development or survey development, you will know how big of a problem spam is. Spam messages can take many forms and with each passing year, it is getting more and more difficult to decypher what messages are genuine and which are spam.

This means that for your A-Level Computer Science NEA project, an idea could be to build a spam filter that could be run on an email server, implementing AI and Machine Learning. There is huge potential with this project idea and it is certainly not an easy one to develop!

38. Music Suggestion Tool

We've all used and heard of the famous YouTube recommendation service... Every time you go on YouTube, they have an algorithm running that recommends videos based on what they think you'll like. Why not make your own version but just for music?

You could even tailor the recommendations to what mood the person is in by analysing music videos for particular themes e.g. sad, happy or exiting. If you did decide to go down this route with your NEA project, there is huge potential with this idea for machine learning implantation which would be designed around user feedback (user specifies whether or not the recommendation was good).

There is a great video on how the YouTube recommendation algorithm works

39. Graph Plotting Software

If you're currently studying A-Level Maths or A-Level Further Maths, you will know the importance of graph plotting software is very high. So, there's demand, why not provide the supply in the form of an NEA computer science project?

Your project could receive a polynomial expression as an input, and output (plot) a visual graphic of that graph... There are many examples of these types of software out there, one that you should check out is GeoGebra.

40. Foreign Language Teacher

This project idea could be made extremely basic, or extremely advanced. However, the fundamental building blocks of this project idea will always be the same; it will assist users in learning a foreign language. I don't think I need to say too much about this idea, but I would recommend you checkout examples of this type of software such as or

41. Sat Nav

This NEA project could potentially consist of both web-scrapping and Dijkstra's algorithm. That is a seriously nice combination!

What is not immediately obvious about this project idea is how much graphical work there is to it - there's a lot. All I'm saying is that if you do decide to choose a project idea similar to this one, be sure that your graphical skills are very strong!

The most obvious example of software similar to what's mentioned above is Google Maps, go check it out, if you're interested.

42. Make Your Own IDE

Now this might seem intimidating at first but hear me out. There's lots of resources out there to help you out on this project and it allows you to be as creative as you want since you're the designer. You should be able to run, debug and compile the code.

43. 2D Platformer Game

This A-Level NEA project allows you to be as creative and go into as much detail as you want. You could include enemies, randomly generated levels, level editors where the player could make their own levels, multiplayer capabilities etc. One of the more challenging things you could do is include the ability to save your position and access it later.

This project will really get your creative juices flowing as, even if someone has the same idea as you, your games could come out wildly different. You can find many game making tutorials, particularly in Python. You may have heard of the popular library pygame which most games in Python are based on. You can click to find a tutorial on the basics of pygame.

44. 3D Platformer Game

One of the advantages of doing a 3D game is that the game itself doesn't actually need to be very complicated. If all goes well, the complexity should come from the 3D rendering, meaning your game could be relatively simple.

45. Revision Aid

As with the platformer, the scalability of this project is up to you and how complex you want to make it. Maybe you want to have a competition element where users get a score for how many questions they get right. This project will require a knowledge of databases (e.g. SQL) so if that's something you're not good with then there's still a few more to go.

46. Circuit Simulator

This project is heavily centred around a good-looking GUI, so you will need to have an immense amount of self-control to ensure you don't throw away hours and hours into a part of the code that barely gets you any marks.

The idea is based around an interactive, online version of a circuit builder, allowing users to connect resistors, lamps and other electrical things I don't know the names of using wires. You may want to make use of , a python library, to help with your GUI.

47. Live Chat Forum/Room

This one is pretty self-explanatory but requires a deep knowledge of networking and client-server communications. There are many you can find online on how to create chat software which is where your creativity will need to come in.

You could think about allowing users to send pictures, create their own group chats, send videos etc. You could even create an AI moderator which censors inappropriate language or detects inappropriate pictures and takes them down.

48. Robotics

This seems quite vague but what I mean is using code to control and communicate with a robot that serves a certain purpose. For example, you could code a robot vacuum to detect walls or the size of the room, where dirt is etc. You can do this through image recognition which by itself is very complex and high level, securing you those marks.

The biggest thing with this is that it requires you to have access to the required hardware so you can check if it works correctly. With the robot vacuum idea, you're going to need to have a robot vacuum on hand.

49. Business Rota Application

Some of you might have part-time jobs, in which case you will have a better idea of what this is. In order to make sure too many people aren't working the same shift at once, businesses often have a rota which keeps track of who goes where and at what time.

You could create a database with a simple GUI which considers new employees and their shifts and orders them accordingly. This ensures shifts aren't clashing or overlapping. You could make this as customisable as you want to where it could apply to any business who have any number of employees working at one time or several related times.

You may need to get into contact with a real business and analyse their current system. That way, you can find anything wrong with it and improve upon it. It also means you have a bit less work to do because you aren't starting from scratch.

50. Recreate a Classic / Retro Game

This takes away the element of coming up with brand new game logic. Instead, you have the rules laid out for you and you just have to follow them. However, there is a definite danger of copying and pasting premade code as the game already exists. Try to add your own twist to the game.

For example, you could remake Pacman but instead of having the ghosts controlled by AI, you could have them be controlled by other users. Not only is this complex, but it also ensures your code isn't identical to the original game. There's a whole library dedicated to retro game making in Python which you can find .

51. Weather Forecaster

As boring as it sounds, it has the potential to get you into that high grade band. It may require some web-scraping and you might want to build your own site to display this info. You could show the predictions for the weather on this site and you could allow the user to enter their email to be sent alerts or notifications if extreme weather is to occur.

52. GPS App

Here's your chance to implement all those path-finding algorithms your teacher might have been telling you about (I'm looking at you ). You can implement this in different ways, whether it's the "Google Maps" approach where the user defines a destination or the "Find My iPhone" approach where the destination is unknown by the user until the app is activated. Maybe they want to put a GPS on their kid's device or their own device.

53. Meteor Trajectory Simulator

If you like space or physics, this one is for you. You can really go wild with this in terms of the GUI and the back-end code. It will need a lot of complex mathematical formulae in order to function correctly, but it will be worth it when you get that top A-Level grade. That's why having at least some interest in mathematics will benefit you in this project. You'll be working with a lot of numbers whether that's calculating velocity or determining the angle of a meteor.

54. 2D Shooter

This is similar to the platformer except the focus will be on the shooting aspect. You could use AI to control the enemies and maybe include different levels of guns that do different damage. You could even do a boss battle. Refer to NEA idea two to find a pygame tutorial which should give you a good base on making the game.

55. Street Fighter Remake

If you've ever played or heard of street fighter, you know what you need to know. However, for the three people at the back who have never heard of it, it's a 2D fighter game. You can customise this however you want and include power ups, boss fights etc. You may need to look at the code of several other similar games to combine them and make your own.

56. Finding the Shortest Route on the London Underground

This project will allow you to use the path finding algorithms and maybe a website. You can calculate the shortest distance between two stations and calculate the time taken to get there. You will probably need to do some research on JavaScript in order to get the backend of your website working. I'll link a website tutorial to get you started.

57. Workshop / Club Booking Timetable

Similar to the rota system, this project will ensure that two people are not booked at the same time on the same day. This will require a knowledge on relational databases, namely SQL which, at this point in your A Level, you should know a bit about. If not, there's a quick you can do to get yourself familiar with queries, primary keys, foreign keys etc.

58. Visualising the Spread of a Disease

You could web-scrape here and show on a map of the world and the associated deaths from a certain disease. In other words, you could for example show hot spots for the disease in reds or oranges and leave the others as white. Web scraping is a relatively easy thing to learn and can be extremely powerful, even outside of your A-Level. Here's a quick to get you started. The complexity will come from how you present the data you've scraped.

59. Plane Seat Booking System

This will be like the workshop booking system in that you need databases to store the customer's information. You would ensure that one seat is not offered to two people at once. You could even keep track of the details of loyal customers and offer them first class tickets or other deals.

60. Stock Management System

This would be a database which stores the amount of stock a business has. You could produce sales reports for the most popular items or see which items are low in stock. There are many combinations of ways you could output this information (e.g. a report, website, email). Just ensure it is more complex than placing the output in the terminal.

61. Traffic Light Controller

This project entails coding an AI to ensure that cars don't collide. You could possibly set it up where, if there's an ambulance, you give it all green lights. You might even want to use image recognition based on a satellite image of a city and gather the locations of the traffic lights on that image. That would really push your grade up as, instead of using a built in library, you can "teach" your AI what traffic lights look like. Find a video tutorial on machine learning in Python .

62. Coupon Collector

If you've ever heard of "Honey", you'll know the gist of this project. You will have to scrape the internet for coupons for a certain website specified by the user. The code could automatically test these coupons and output the cheapest one. See number 17 for a website scraping tutorial.

63. Facial Recognition Software

This project seems complex but that's a good thing if you want the highest grade. This has a variety of purposes as many of you are likely familiar with the face recognition on many phones. Read this on how the basics of how to do it in Python and find out more.

Make sure you aren't just relying on built in libraries to handle the complex algorithms because all those marks will disappear. You have to write the code yourself and typing "import facialRecognition" doesn't count, as sad as that is.

64. Chess Over Two Computers

Here you can include networking and client-server communication (both of which are references in the A-Level Computer Science specification). There is a possibility to include AI which detects automatically if there is a check or checkmate. This would require you to keep track of the ending positions of each piece and know what constitutes as a check for example. Most turn-based games rely on a sort of algorithm which you can find out more about .

65. Sudoku Solver

This requires intense programming and AI but will totally be worth it by the end. You could give the user the opportunity to try and solve it themselves at first then, afterwards, give them the answer. You could also set a time limit, you could have a scoreboard, there's lots of things you could do with it. Also, you may want to have the unsolved puzzle be randomly generated which adds a whole new layer of complexity. Computerphile has a great on this exact subject in Python.

66. Social Media Specifically for Students in the Same College or University

A social media idea has already been suggested but you may want to make one specifically for your college. The students could input their timetables and the code could suggest other students with the same timetable. That way, they can meet during their mutual break time. You could also include groupchats for specific subjects at your college.

67. Fantasy Football Team

Web scraping is going to be a major concept in this project unless you want to hard code in every footballer on every team. You could set up a network where fantasy teams can "play" against each other and winners get more points. The user can customise their own team and earn points. You can then display it in a website or another GUI like TKinter.

68. Planet Orbit Simulator

This one goes out to the physics and maths students again. Allow the user to change the size, direction and colour (why not?) of planets and calculate the trajectory of their new orbit. This would entail many mathematical calculations so, if you like this sort of thing, this is for you. It also gives you the chance to use and render 3D graphics in order to visualise the planets for the user.

Take a look at the game Kerbal Space Program for an advanced implementation of this idea!

69. Pathfinding Comparer

70. Finding Shortest Path on a College / University Campus

With this project, you would need to create a graph with each node corresponding to the buildings or departments on the map. This would make more sense if you choose a college or university that has a big campus that spans over a large geographical area. It may end up being very useful for those students who have 5 minutes to speed walk all the way across their campus. The heuristic or weight of each edge could be determined by many things (e.g. whether you have to cross a road, if you have to go through a certain building with stairs etc).

71. Solitaire

This popular card game might be simple to code but to add that layer of complexity, you can include the option for an AI to complete the game for the user. It needs to be able to recognise if the game is completable though.

72. Password Manager

73. Simple Board Game

You might want to come up with your own board game or copy another anywhere from Scrabble to Monopoly. This will take a lot of time and consideration into how you would like it to work. You may want to set up a tutorial or make it multiplayer against other humans (this might be your chance to include AI)

74. Cash register

A cash register would be great as you can base it off pre-existing cash registers in terms of the functionality. It offers a web version of a cash register that would be used by small businesses. This means you could contact small businesses in your area and cater to their needs. It may track sales, inventory and checkout credit cards. The options for what you want the cash register to do are completely up to you and your client's needs.

75. Tetris

This kind of goes under the retro games column however, there is the potential for AI to be implemented. You could program the AI to play the most efficient move and get the most points. The best way to go about this is to code the game by itself first the add the AI afterwards. You can even apply a competitive element by having a score system via relational database or multiplayer functionality.

76. Pacman Recreation

You can use AI to control the ghosts and, to really push yourself, you can add difficulty levels to these ghosts. Maybe the longer/more a user plays, the harder the ghosts get. You can increase their difficulty by making them faster or making them "smarter". This would require path-finders to find the shortest path from the ghost to the player.

The Importance of Mark Schemes and Specifications

The mark schemes and specifications for A-Level Computer Science will be your best friends throughout your whole coursework experience. Though they can sometimes be vague, you should be working closely with them to ensure your project hits all the points you need so you can collect those marks. Good luck!

# data[].attributes.attachment_link.title
75+ A-Level Computer Science NEA Project Ideas - Think Student

# data[].attributes.attachment_link.description
Computer Science at A-Level is sometimes misunderstood as being a subject where all you do is sit in front of a screen, coding away in Python, trying to build the next Google. While a lot of your time is spent staring at a computer screen, it's not just about coding.

# data[].attributes.attachment_link.description
Isaac Computer Science is a free online learning platform for A level, funded by the Department for Education.

# data[].attributes.attachment_link.title
20 A* Project Ideas for A-level Computer Science NEA. – The British Exams

# data[].attributes.attachment_link.description
A-level Computer Science is one of the most interesting and fascinating subjects. The practical aspect in which you need to create a project is the most creative and high scoring component in A-level Computer Science.

# data[].attributes.headline
Datacraping with Beautiful soup (imports into repl!)

# data[].attributes.subject
Datacraping with Beautiful soup (imports into repl!)

# data[].attributes.attachment_link.readable_text
The internet is an absolutely massive source of data - data that we can access using web scraping and Python!

In fact, web scraping is often the only way we can access data. There is a lot of information out there that isn't available in convenient CSV exports or easy-to-connect APIs. And websites themselves are often valuable sources of data - consider, for example, the kinds of analysis you could do if you could download every post on a web forum.

To access those sorts of on-page datasets, we'll have to use web scraping.
Don't worry if you're still a total beginner!
In this tutorial we're going to cover how to do web scraping with Python from scratch, starting with some answers to frequently-asked questions.

Then, we'll work through an actual web scraping project, focusing on weather data.
We'll work together to scrape weather data from the web to support a weather app.

But before we start writing any Python, we've got to cover the basics! If you're already familiar with the concept of web scraping, feel free to scroll past these questions and jump right into the tutorial!

The Fundamentals of Web Scraping:

What is Web Scraping in Python?

Some websites offer data sets that are downloadable in CSV format, or accessible via an Application Programming Interface (API). But many websites with useful data don't offer these convenient options.

Consider, for example, the National Weather Service's website. It contains up-to-date weather forecasts for every location in the US, but that weather data isn't accessible as a CSV or via API. It has to be viewed on the NWS site:

If we wanted to analyze this data, or download it for use in some other app, we wouldn't want to painstakingly copy-paste everything. Web scraping is a technique that lets us use programming to do the heavy lifting. We'll write some code that looks at the NWS site, grabs just the data we want to work with, and outputs it in the format we need.

In this tutorial, we'll show you how to perform web scraping using Python 3 and the Beautiful Soup library. We'll be scraping weather forecasts from the National Weather Service, and then analyzing them using the Pandas library.

But to be clear, lots of programming languages can be used to scrape the web! We also teach web scraping in R, for example. For this tutorial, though, we'll be sticking with Python.

How Does Web Scraping Work?

When we scrape the web, we write code that sends a request to the server that's hosting the page we specified. The server will return the source code - HTML, mostly - for the page (or pages) we requested.

So far, we're essentially doing the same thing a web browser does - sending a server request with a specific URL and asking the server to return the code for that page.

But unlike a web browser, our web scraping code won't interpret the page's source code and display the page visually. Instead, we'll write some custom code that filters through the page's source code looking for specific elements we've specified, and extracting whatever content we've instructed it to extract.

For example, if we wanted to get all of the data from inside a table that was displayed on a web page, our code would be written to go through these steps in sequence:

1. Request the content (source code) of a specific URL from the server

2. Download the content that is returned

3. Identify the elements of the page that are part of the table we want

4. Extract and (if necessary) reformat those elements into a dataset we can analyze or use in whatever way we require.

If that all sounds very complicated, don't worry! Python and Beautiful Soup have built-in features designed to make this relatively straightforward.

One thing that's important to note: from a server's perspective, requesting a page via web scraping is the same as loading it in a web browser. When we use code to submit these requests, we might be "loading" pages much faster than a regular user, and thus quickly eating up the website owner's server resources.

Why Use Python for Web Scraping?

As previously mentioned, it's possible to do web scraping with many programming languages.

However, one of the most popular approaches is to use Python and the Beautiful Soup library, as we'll do in this tutorial.

Learning to do this with Python will mean that there are lots of tutorials, how-to videos, and bits of example code out there to help you deepen your knowledge once you've mastered the Beautiful Soup basics.

Is Web Scraping Legal?

Unfortunately, there's not a cut-and-dry answer here. Some websites explicitly allow web scraping. Others explicitly forbid it. Many websites don't offer any clear guidance one way or the other.

Before scraping any website, we should look for a terms and conditions page to see if there are explicit rules about scraping. If there are, we should follow them. If there are not, then it becomes more of a judgement call.

Remember, though, that web scraping consumes server resources for the host website. If we're just scraping one page once, that isn't going to cause a problem. But if our code is scraping 1,000 pages once every ten minutes, that could quickly get expensive for the website owner.

Thus, in addition to following any and all explicit rules about web scraping posted on the site, it's also a good idea to follow these best practices:

Web Scraping Best Practices:

Never scrape more frequently than you need to.

Consider caching the content you scrape so that it's only downloaded once.

Build pauses into your code using functions like to keep from overwhelming servers with too many requests too quickly.

In our case for this tutorial, the NWS's data is public domain and its terms do not forbid web scraping, so we're in the clear to proceed.

Learn Python the Right Way.

Learn Python by writing Python code from day one, right in your browser window. It's the best way to learn Python - see for yourself with one of our 60+ free lessons.
Try Dataquest
The Components of a Web Page

Before we start writing code, we need to understand a little bit about the structure of a web page. We'll use the site's structure to write code that gets us the data we want to scrape, so understanding that structure is an important first step for any web scraping project.
When we visit a web page, our web browser makes a request to a web server. This request is called a GET request, since we're getting files from the server. The server then sends back files that tell our browser how to render the page for us. These files will typically include:

HTML - the main content of the page.

CSS - used to add styling to make the page look nicer.

JS - Javascript files add interactivity to web pages.

Images - image formats, such as JPG and PNG, allow web pages to show pictures.

After our browser receives all the files, it renders the page and displays it to us.

There's a lot that happens behind the scenes to render a page nicely, but we don't need to worry about most of it when we're web scraping. When we perform web scraping, we're interested in the main content of the web page, so we look primarily at the HTML.

HTML

HyperText Markup Language (HTML) is the language that web pages are created in. HTML isn't a programming language, like Python, though. It's a markup language that tells a browser how to display content.

HTML has many functions that are similar to what you might find in a word processor like Microsoft Word - it can make text bold, create paragraphs, and so on.

If you're already familiar with HTML, feel free to jump to the next section of this tutorial. Otherwise, let's take a quick tour through HTML so we know enough to scrape effectively.

HTML consists of elements called tags. The most basic tag is the <html> tag. This tag tells the web browser that everything inside of it is HTML. We can make a simple HTML document just using this tag:

We haven't added any content to our page yet, so if we viewed our HTML document in a web browser, we wouldn't see anything:

The main content of the web page goes into the body tag. The head tag contains data about the title of the page, and other information that generally isn't useful in web scraping:

We still haven't added any content to our page (that goes inside the body tag), so if we open this HTML file in a browser, we still won't see anything:

We'll now add our first content to the page, inside a p tag. The p tag defines a paragraph, and any text inside the tag is shown as a separate paragraph:

<html> <head> </head> <body> <p> Here's a paragraph of text! </p> <p> Here's a second paragraph of text! </p> </body> </html>

Rendered in a browser, that HTML file will look like this:

Here's a paragraph of text!

Here's a second paragraph of text!

Tags have commonly used names that depend on their position in relation to other tags:

sibiling - a sibiling is a tag that is nested inside the same parent as another tag. For example, head and body are siblings, since they're both inside html. Both p tags are siblings, since they're both inside body.

We can also add properties to HTML tags that change their behavior. Below, we'll add some extra text and hyperlinks using the a tag.

<html> <head> </head> <body> <p> Here's a paragraph of text! <a href="https://www.dataquest.io">Learn Data Science Online</a> </p> <p> Here's a second paragraph of text! <a href="https://www.python.org">Python</a> </p> </body></html>

Here's how this will look:

Here's a paragraph of text! Learn Data Science Online

Here's a second paragraph of text! Python

a and p are extremely common html tags. Here are a few others:

div - indicates a division, or area, of the page.

b - bolds any text inside.

i - italicizes any text inside.

table - creates a table.

form - creates an input form.

For a full list of tags, look here.

Before we move into actual web scraping, let's learn about the class and id properties. These special properties give HTML elements names, and make them easier to interact with when we're scraping.

One element can have multiple classes, and a class can be shared between elements. Each element can only have one id, and an id can only be used once on a page. Classes and ids are optional, and not all elements will have them.

We can add classes and ids to our example:

<html> <head> </head> <body> <p class="bold-paragraph"> Here's a paragraph of text! <a href="https://www.dataquest.io" id="learn-link">Learn Data Science Online</a> </p> <p class="bold-paragraph extra-large"> Here's a second paragraph of text! <a href="https://www.python.org" class="extra-large">Python</a> </p> </body> </html>

Here's how this will look:

Here's a paragraph of text! Learn Data Science Online

Here's a second paragraph of text! Python

As you can see, adding classes and ids doesn't change how the tags are rendered at all.

The requests library

Now that we understand the structure of a web page, it's time to get into the fun part: scraping the content we want!
The first thing we'll need to do to scrape a web page is to download the page. We can download pages using the Python requests library.

The requests library will make a GET request to a web server, which will download the HTML contents of a given web page for us. There are several different types of requests we can make using requests, of which GET is just one. If you want to learn more, check out our API tutorial.

Let's try downloading a simple sample website, https://dataquestio.github.io/web-scraping-pages/simple.html.

We'll need to first import the requests library, and then download the page using the requests.get method:

import requests page = requests.get( "https://dataquestio.github.io/web-scraping-pages/simple.html" ) page

After running our request, we get a Response object. This object has a status_code property, which indicates if the page was downloaded successfully:

A status_code of 200 means that the page downloaded successfully. We won't fully dive into status codes here, but a status code starting with a 2 generally indicates success, and a code starting with a 4 or a 5 indicates an error.

We can print out the HTML content of the page using the content property:

<!DOCTYPE html> <html> <head> <title>A simple example page</title> </head> <body> <p>Here is some simple content for this page.</p> </body> </html>

Parsing a page with BeautifulSoup

As you can see above, we now have downloaded an HTML document.

We can use the BeautifulSoup library to parse this document, and extract the text from the p tag.

We first have to import the library, and create an instance of the BeautifulSoup class to parse our document:

We can now print out the HTML content of the page, formatted nicely, using the prettify method on the BeautifulSoup object.

<!DOCTYPE html> <html> <head> <title>A simple example page</title> </head> <body> <p>Here is some simple content for this page.</p> </body> </html>

This step isn't strictly necessary, and we won't always bother with it, but it can be helpful to look at prettified HTML to make the structure of the and where tags are nested easier to see.
As all the tags are nested, we can move through the structure one level at a time. We can first select all the elements at the top level of the page using the children property of soup.

Note that children returns a list generator, so we need to call the list function on it:

['html', 'n', <html> <head> <title>A simple example page</title> </head> <body> <p>Here is some simple content for this page.</p> </body> </html>]

[bs4.element.Doctype, bs4.element.NavigableString, bs4.element.Tag]

As we can see, all of the items are BeautifulSoup objects:

The first is a Doctype object, which contains information about the type of the document.

The second is a NavigableString, which represents text found in the HTML document.

The final item is a Tag object, which contains other nested tags.

The most important object type, and the one we'll deal with most often, is the Tag object.

The Tag object allows us to navigate through an HTML document, and extract other tags and text. You can learn more about the various BeautifulSoup objects here.

We can now select the html tag and its children by taking the third item in the list:

Each item in the list returned by the children property is also a BeautifulSoup object, so we can also call the children method on html.

Now, we can find the children inside the html tag:

['n', <head> <title>A simple example page</title> </head>, 'n', <body> <p>Here is some simple content for this page.</p> </body>, 'n']

Now, we can get the p tag by finding the children of the body tag:

['n', <p>Here is some simple content for this page.</p>, 'n']

We can now isolate the p tag:

Once we've isolated the tag, we can use the get_text method to extract all of the text inside the tag:

'Here is some simple content for this page.'

Finding all instances of a tag at once

What we did above was useful for figuring out how to navigate a page, but it took a lot of commands to do something fairly simple.

If we want to extract a single tag, we can instead use the find_all method, which will find all the instances of a tag on a page.

[<p>Here is some simple content for this page.</p>]

Note that find_all returns a list, so we'll have to loop through, or use list indexing, it to extract text:

'Here is some simple content for this page.'

f you instead only want to find the first instance of a tag, you can use the find method, which will return a single BeautifulSoup object:

<p>Here is some simple content for this page.</p>

Searching for tags by class and id

We introduced classes and ids earlier, but it probably wasn't clear why they were useful.

Classes and ids are used by CSS to determine which HTML elements to apply certain styles to. But when we're scraping, we can also use them to specify the elements we want to scrape.

To illustrate this principle, we'll work with the following page:

<html> <head> <title>A simple example page</title> </head> <body> <div> <p class="inner-text first-item" id="first"> First paragraph. </p> <p class="inner-text"> Second paragraph. </p> </div> <p class="outer-text first-item" id="second"> <b> First outer paragraph. </b> </p> <p class="outer-text"> <b> Second outer paragraph. </b> </p> </body> </html>

We can access the above document at the URL https://dataquestio.github.io/web-scraping-pages/ids_and_classes.html.

Let's first download the page and create a BeautifulSoup object:

<html> <head> <title>A simple example page </title> </head> <body> <div> <p class="inner-text first-item" id="first"> First paragraph. </p><p class="inner-text"> Second paragraph. </p></div> <p class="outer-text first-item" id="second"><b> First outer paragraph. </b></p><p class="outer-text"><b> Second outer paragraph. </b> </p> </body> </html>

[<p class="outer-text first-item" id="second"> <b> First outer paragraph. </b> </p>, <p class="outer-text"> <b> Second outer paragraph. </b> </p>]

In the below example, we'll look for any tag that has the class outer-text:

<p class="outer-text first-item" id="second"> <b> First outer paragraph. </b> </p>, <p class="outer-text"> <b> Second outer paragraph. </b> </p>]

We can also search for elements by id:

[<p class="inner-text first-item" id="first"> First paragraph. </p>]

Using CSS Selectors

We can also search for items using CSS selectors. These selectors are how the CSS language allows developers to specify HTML tags to style. Here are some examples:

body p a - finds all a tags inside of a p tag inside of a body tag.

body p.outer-text - finds any p tags with a class of outer-text inside of a body tag.

You can learn more about CSS selectors here.

BeautifulSoup objects support searching a page via CSS selectors using the select method. We can use CSS selectors to find all the p tags in our page that are inside of a div like this:

[<p class="inner-text first-item" id="first"> First paragraph. </p>, <p class="inner-text"> Second paragraph. </p>]

Note that the select method above returns a list of BeautifulSoup objects, just like find and find_all.

Downloading weather data

We now know enough to proceed with extracting information about the local weather from the National Weather Service website!

The first step is to find the page we want to scrape. We'll extract weather information about downtown San Francisco from this page.

Specifically, let's extract data about the extended forecast.

As we can see from the image, the page has information about the extended forecast for the next week, including time of day, temperature, and a brief description of the conditions.

Exploring page structure with Chrome DevTools

The first thing we'll need to do is inspect the page using Chrome Devtools. If you're using another browser, Firefox and Safari have equivalents.

You can start the developer tools in Chrome by clicking View -> Developer -> Developer Tools. You should end up with a panel at the bottom of the browser like what you see below. Make sure the Elements panel is highlighted:
Chrome Developer Tools
The elements panel will show you all the HTML tags on the page, and let you navigate through them. It's a really handy feature!

By right clicking on the page near where it says "Extended Forecast", then clicking "Inspect", we'll open up the tag that contains the text "Extended Forecast" in the elements panel:
The extended forecast text
We can then scroll up in the elements panel to find the "outermost" element that contains all of the text that corresponds to the extended forecasts. In this case, it's a div tag with the id seven-day-forecast:
The div that contains the extended forecast items.
If we click around on the console, and explore the div, we'll discover that each forecast item (like "Tonight", "Thursday", and "Thursday Night") is contained in a div with the class tombstone-container.

Time to Start Scraping!

We now know enough to download the page and start parsing it. In the below code, we will:

Download the web page containing the forecast.

Create a BeautifulSoup class to parse the page.

Inside seven_day, find each individual forecast item.

Extract and print the first forecast item.

<div class="tombstone-container"> <p class="period-name"> Tonight <br> <br/> </br> </p> <p> <img alt="Tonight: Mostly clear, with a low around 49. West northwest wind 12 to 17 mph decreasing to 6 to 11 mph after midnight. Winds could gust as high as 23 mph. " class="forecast-icon" src="newimages/medium/nfew.png" title="Tonight: Mostly clear, with a low around 49. West northwest wind 12 to 17 mph decreasing to 6 to 11 mph after midnight. Winds could gust as high as 23 mph. "/> </p> <p class="short-desc"> Mostly Clear </p> <p class="temp temp-low"> Low: 49 °F </p> </div>

Extracting information from the page

As we can see, inside the forecast item tonight is all the information we want. There are four pieces of information we can extract:

The name of the forecast item - in this case, Tonight.

The description of the conditions - this is stored in the title property of img.

A short description of the conditions - in this case, Mostly Clear.

The temperature low - in this case, 49 degrees.

We'll extract the name of the forecast item, the short description, and the temperature first, since they're all similar:

Tonight Mostly Clear Low: 49 °F

Tonight: Mostly clear, with a low around 49. West northwest wind 12 to 17 mph decreasing to 6 to 11 mph after midnight. Winds could gust as high as 23 mph.

Extracting all the information from the page

Now that we know how to extract each individual piece of information, we can combine our knowledge with CSS selectors and list comprehensions to extract everything at once.

In the below code, we will:

Use a list comprehension to call the get_text method on each BeautifulSoup object.

['Tonight', 'Thursday', 'ThursdayNight', 'Friday', 'FridayNight', 'Saturday', 'SaturdayNight', 'Sunday', 'SundayNight']

As we can see above, our technique gets us each of the period names, in order.

We can apply the same technique to get the other three fields:

['Mostly Clear', 'Sunny', 'Mostly Clear', 'Sunny', 'Slight ChanceRain', 'Rain Likely', 'Rain Likely', 'Rain Likely', 'Chance Rain'] ['Low: 49 °F', 'High: 63 °F', 'Low: 50 °F', 'High: 67 °F', 'Low: 57 °F', 'High: 64 °F', 'Low: 57 °F', 'High: 64 °F', 'Low: 55 °F'] ['Tonight: Mostly clear, with a low around 49. West northwest wind 12 to 17 mph decreasing to 6 to 11 mph after midnight. Winds could gust as high as 23 mph. ', 'Thursday: Sunny, with a high near 63. North wind 3 to 5 mph. ', 'Thursday Night: Mostly clear, with a low around 50. Light and variable wind becoming east southeast 5 to 8 mph after midnight. ', 'Friday: Sunny, with a high near 67. Southeast wind around 9 mph. ', 'Friday Night: A 20 percent chance of rain after 11pm. Partly cloudy, with a low around 57. South southeast wind 13 to 15 mph, with gusts as high as 20 mph. New precipitation amounts of less than a tenth of an inch possible. ', 'Saturday: Rain likely. Cloudy, with a high near 64. Chance of precipitation is 70%. New precipitation amounts between a quarter and half of an inch possible. ', 'Saturday Night: Rain likely. Cloudy, with a low around 57. Chance of precipitation is 60%.', 'Sunday: Rain likely. Cloudy, with a high near 64.', 'Sunday Night: A chance of rain. Mostly cloudy, with a low around 55.']

Combining our data into a Pandas Dataframe

We can now combine the data into a Pandas DataFrame and analyze it. A DataFrame is an object that can store tabular data, making data analysis easy. If you want to learn more about Pandas, check out our free to start course here.

In order to do this, we'll call the DataFrame class, and pass in each list of items that we have. We pass them in as part of a dictionary.

Each dictionary key will become a column in the DataFrame, and each list will become the values in the column:

We can now do some analysis on the data. For example, we can use a regular expression and the Series.str.extract method to pull out the numeric temperature values:

0 49 1 63 2 50 3 67 4 57 5 64 6 57 7 64 8 55 Name: temp_num, dtype: object

We could then find the mean of all the high and low temperatures:

58.444444444444443

We could also only select the rows that happen at night:

0 True 1 False 2 True 3 False 4 True 5 False 6 True 7 False 8 True Name: temp, dtype: bool

0 True 1 False 2 True 3 False 4 True 5 False 6 True 7 False 8 True Name: temp, dtype: bool

Next Steps For This Web Scraping Project

If you've made it this far, congratulations! You should now have a good understanding of how to scrape web pages and extract data. Of course, there's still a lot more to learn!

If you want to go further, a good next step would be to pick a site and try some web scraping on your own. Some good examples of data to scrape are:

News articles

Sports scores

Weather forecasts

Stock prices

Online retailer prices

You may also want to keep scraping the National Weather Service, and see what other data you can extract from the page, or about your own city.

Alternatively, if you want to take your web scraping skills to the next level, you can check out our interactive course, which covers both the basics of web scraping and using Python to connect to APIs. With those two skills under your belt, you'll be able to collect lots of unique and interesting datasets from sites all over the web!

Learn Python the Right Way.

Learn Python by writing Python code from day one, right in your browser window. It's the best way to learn Python - see for yourself with one of our 60+ free lessons.
Try Dataquest
Tags

About the author

Vik Paruchuri

Vik is the CEO and Founder of Dataquest.

# data[].attributes.attachment_link.title
Tutorial: Web Scraping with Python Using Beautiful Soup

# data[].attributes.attachment_link.description
The internet is an absolutely massive source of data - data that we can access using web scraping and Python! In fact, web scraping is often the only way we can access data. There is a lot of information out there that isn't available in convenient CSV exports or easy-to-connect APIs.

# data[].attributes.headline
Hegarty maths video Dijkstra's shortest path

# data[].attributes.subject
Hegarty maths video Dijkstra's shortest path

# data[].attributes.attachment_link.title
Dijkstra's Algorithm  (Decision Maths 1)

# data[].attributes.attachment_link.description
Using Dijkstra's Algorithm to find the shortest path between 2 points in a network www.hegartymaths.com http://www.hegartymaths.com/

# data[].attributes.attachment_link.description
The free online learning platform for GCSE and A level Computer Science students and teachers. Discover our computer science revision and homework questions today.

# data[].attributes.attachment_link.readable_text
This is for the AQA A Level Computer Science Specification.

This is where suggestions can be made about what some of the questions might be and how we can solve them.

Please be respectful and do not vandalise the page, as this would affect students' preparation for exams!

Please do not discuss questions on this page. Instead use the discussion page.

Section C Predictions

The 2023 paper 1 will contain 6 questions worth 13 marks. As long as you know the program well, this will be a walk in the park.

Section D Predictions

Programming Questions on Skeleton Program

The 2023 paper 1 contains 4 questions: a 5 mark, a 9 mark question, a 10 mark question and one 13 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.

The 2022 paper 1 contains 4 questions: a 5 mark, a 9 mark question, a 11 mark question and one 13 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.

The 2021 paper 1 contained ...

The 2020 paper 1 contained 4 questions: a 6 mark, an 8 mark question, a 11 mark question and one 12 mark question - these marks include the screen capture(s), so the likely marks for the coding will be 1-2 marks lower.

The 2019 paper 1 contained 4 questions: a 5 mark, an 8 mark question, a 9 mark question and one 13 mark question - these marks include the screen capture(s), so the marks for the coding will be 1-2 marks lower.

The 2018 paper 1 contained one 2 mark question, a 5 mark question, two 9 mark questions, and one 12 mark question - these marks include the screen capture(s).

The 2017 paper 1 contained a 5 mark question, three 6 mark questions, and one 12 mark question.

Current questions are speculation by contributors to this page.

Description of problem: The program is to be extended with a new type of move called the "TibbleCross". This move can allow a piece to go up two spaces diagonally from its starting position in any direction ( NW, NE, SE, SW ).

Add this move so it appears first in the queue of moves for both players.

Select the move and test it by selecting piece "22" and then moving to row/column "44"

Description of problem: Add a new move which moves forward until the piece hits the end of the board or hits another piece

Description of problem: When choosing where to move a piece, you must input the start square and finish square. If a valid start square is chosen, but an invalid destination square, the program will move on without prompting the player to re-enter.

Alter the code to prompt the user to re-enter the finish square until a valid square is given.

Description of problem: Add a new move called a spacejump which moves the chosen piece to a random place on the board. It can't land on your own pieces, but everywhere else is fine. The player cannot choose where the piece will end up. The spacejump move will not be added to the queue of moves, instead a player is allowed one per game that can be used whenever they choose in lieu of a queue choice. Test by allowing player 1 to use the option from square 22 and then player 2 from square 55. Player 1 will not have the option displayed on their next turn.

At the beginning of the game allow each user to enter their own name to be used as a replacement to "Player One" and "Player Two"

Description of problem: At the moment when selecting a move the player is expected to remember the ways in which move can be applied. Modify the program so that, once a piece has been selected a '^' symbol appears in the squares into which that piece can be moved based on the move selected. - Resolve using method A1 specification

Any improvements would be appreciated.

Description of problem: Randomize the players move queue at the beginning of the game so that the players do not start with the same queue at the beginning of every game.

Description of problem: At the beginning of the game, allow players the option to choose where they place their (Kotla and Mirza) together at the back of their side of the board. For example: Player One can place their Kotla and Mirza between (1,1) to (1,6) and Player Two can place their Kotla and Mirza between (6,1) and (6,6).

Description of problem: Add a third player to the game.

Description of problem: Currently, if a player accepts the move option offer (so for example, player 1 takes the jazair offer and replaces the ryott), they then get exactly the same choices again: Choose move option to use from queue (1 to 3) or 9 to take the offer:. This is what the Preliminary Material says will happen "Taking the move option from the offer does not count as a move" ... it is still that player's turn. However, your challenge is to change this, so it DOES count as a turn, and if they choose 9, it goes on to the next player.

Description of problem: Currently you can crash the game when asked to choose "use from queue (1 to 3) or 9 to take the offer" by entering non-integer input.

Validate user input forcing it to be an integer, for choosing 1, 2, 3 or 9, and, if 9 was chosen, for then choosing the move option to replace. A good way to do this is to write a method __ValidateUserInput(PromptString) in the Dastan class, and call this method in PlayGame, passing it the required prompt strings in the two situations where it needs to be called. The method should return the user's input. For now, I would not validate whether it is an appropriate integer, just that it is in fact an integer. To do this you will need to use try ... except ValueError, and a while loop.

Python:

- If you notice a mistake do fix it and if any improvements can be made, please do so :)

Description of problem: You should also see that the Kotla class has some extra lines in the method GetPointsForOccupancy. The child class can add extra attributes and methods, and can alter existing methods.

This example which is already in the code, could be used to model another subclass. For example a "portal" which automatically moves any piece which goes onto it to a certain point. Or a "booster" square which increases the player's score. I'm not sure what the exam in the summer will ask you to do, but my money is on some kind of new class, based on the Kotla model.

For now, try a "portal" class, which will be placed on square 42 for player 1 and 35 for player 2. Any of the player's own pieces which go to this square should magically move to the other player's mirza and win the game.

Potential Questions:

Make the board larger (or allow the user to set the board size).

User help / info / tutorial page.

New class to allow for saving and loading the game.

Limit the number of times the offer option can be taken in a turn.

Undo move option.

Display scores at the end.

Instead of one offer generated, generate three random offers for the user to pick from.

End the game when one person's score reaches 0 or goes negative.

.

.

.

.

# data[].attributes.attachment_link.title
A-level Computing/AQA/Paper 1/Skeleton program/2023 - Wikibooks, open books for an open world

# data[].attributes.attachment_link.description
This is for the AQA A Level Computer Science Specification.

# data[].attributes.attachment_link.readable_text
This is a book about A-Level Computer Science. It aims to fit with the AQA GCE A-Level Computer Science 2015 syllabus but is not endorsed by AQA. It should be useful as a revision guide or to find alternative explanations to the ones in your textbook. If you haven't heard of an A-Level then this book probably won't be of much interest to you but you can find out about them at Wikipedia.

If any part of this book is unclear or even wrong then please post a comment on the discussion page or simply fix it yourself! In particular, please say if the book assumes any knowledge or skills which not all A-Level Computer Science students have.

Paper 1 Index

Paper 2 Index

Non-exam assessment

Programming

Accepted languages

A-Level Projects can be written in any language.

Old Specification (up to 2017)

How to read the book

You will meet several coloured boxes, here are their meanings:

There will be a lot of concepts that you need to be familiar with, definitions are highlighted like so:

Course Structure

To be awarded an AS (Advanced Subsidiary) Level qualification in Computing, a student must take the 2 AS modules.

To be awarded an A (Advanced) Level qualification in Computing, a student must take all 4 modules.

The book is split into the four units. Each unit is split into chapters with each chapter covering the topics for that module.

Uncategorized Pages

# data[].attributes.attachment_link.title
A-level Computing/AQA - Wikibooks, open books for an open world

# data[].attributes.attachment_link.description
This is a book about A-Level Computer Science. It aims to fit with the AQA GCE A-Level Computer Science 2015 syllabus but is not endorsed by AQA. It should be useful as a revision guide or to find alternative explanations to the ones in your textbook.

# data[].attributes.attachment_link.keywords[]
computing programming exam examination revision ocr aqa edexcel pearson "computer science" gcse "a level" theory specification

# data[].attributes.attachment_link.description
The Craig'n'Dave YouTube channel provides students and teachers with ad-free videos covering the knowledge required for every bullet point of the GCSE and A Level specification for Computer Science. Unlike all other channels, these are not generic computer science videos. They are bespoke to the specification with different videos for each exam board, OCR, AQA and Edexcel.

# data[].attributes.attachment_link.readable_text
Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways.

A Tree Data Structure can be traversed in following ways:

1. Depth First Search or DFS

1. Inorder Traversal

2. Preorder Traversal

3. Postorder Traversal

2. Level Order Traversal or Breadth First Search or BFS

3. Boundary Traversal

4. Diagonal Traversal

Algorithm Inorder(tree)

1. Traverse the left subtree, i.e., call Inorder(left->subtree)

2. Visit the root.

3. Traverse the right subtree, i.e., call Inorder(right->subtree)

Uses of Inorder Traversal:

In the case of binary search trees (BST), Inorder traversal gives nodes in non-decreasing order. To get nodes of BST in non-increasing order, a variation of Inorder traversal where Inorder traversal is reversed can be used.

Code implementation of Inorder traversal.
Output
Inorder traversal of binary tree is
4 2 5 1 3

Time Complexity: O(N)
Auxiliary Space: If we don't consider the size of the stack for function calls then O(1) otherwise O(h) where h is the height of the tree.

Algorithm Preorder(tree)

1. Visit the root.

2. Traverse the left subtree, i.e., call Preorder(left->subtree)

3. Traverse the right subtree, i.e., call Preorder(right->subtree)

Uses of Preorder:

Preorder traversal is used to create a copy of the tree. Preorder traversal is also used to get prefix expressions on an expression tree.

Code implementation of Preorder traversal:
Output
Preorder traversal of binary tree is
1 2 4 5 3

Time Complexity: O(N)
Auxiliary Space: If we don't consider the size of the stack for function calls then O(1) otherwise O(h) where h is the height of the tree.

Algorithm Postorder(tree)

1. Traverse the left subtree, i.e., call Postorder(left->subtree)

2. Traverse the right subtree, i.e., call Postorder(right->subtree)

3. Visit the root

Uses of Postorder:

Postorder traversal is used to delete the tree. Please see the question for the deletion of a tree for details. Postorder traversal is also useful to get the postfix expression of an expression tree

Below is the implementation of the above traversal methods:
Output
Postorder traversal of binary tree is
4 5 2 3 1

Some other Tree Traversals Techniques:

Some of the other tree traversals are:

For each node, first, the node is visited and then it's child nodes are put in a FIFO queue. Then again the first node is popped out and then it's child nodes are put in a FIFO queue and repeat until queue becomes empty.

Example:

Input: Level Order Treversal:
1
2 3
4 5

The Boundary Traversal of a Tree includes:

1. left boundary (nodes on left excluding leaf nodes)

2. leaves (consist of only the leaf nodes)

3. right boundary (nodes on right excluding leaf nodes)

In the Diagonal Traversal of a Tree, all the nodes in a single diagonal will be printed one by one.

Input :

Diagonal Traversal of binary tree:

8 10 14

3 6 7 13

1 4

Last Updated : 23 Jun, 2023

# data[].attributes.attachment_link.title
Tree Traversal Techniques - Data Structure and Algorithm Tutorials - GeeksforGeeks

# data[].attributes.attachment_link.description
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

# data[].attributes.headline
Dijkstra's shortest path interactive exercise

# data[].attributes.subject
Dijkstra's shortest path interactive exercise

# data[].attributes.attachment_link.title
Short Path Algorithm Practice - 101 Computing

# data[].attributes.attachment_link.description
Before completing this task, you will need to familiarise yourself with the following 2 algorithms used to find the shortest path between two nodes of a weighted graph: Dijkstra's Short Path Algorithm A* Algorithm Dijkstra's Short Path Algorithm For each of the weighted graph below, complete the table below to show the steps needed to

# data[].attributes.attachment_link.title
How Do I Complete the AQA A Level Computer Science NEA?