More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
page
Python IDE Dashboard

How to create flying/falling objects in Scratch

In this tutorial we will get a spaceship to fall from the top to the bottom of the screen.

scratch_FlyingRocket

Add the following code to your sprite (e.g. Spaceship):

scratch_FlyingRocketScript

xy-gridTo understand this script you need to understand how x and y coordinates work in Scratch.
When using scratch the “playing area” is based on the following grid:

  • The centre of the grid is (x=0, y=0)
  • The bottom left corner is (x=-240, y=-180)
  • The top right corner is (x=240, y=180)

 

You can download this helpsheet as a pdf: How to create flying or falling objects in Scratch

Tagged with: , , ,

How to create a timer in Scratch?

Step 1 – Create a new variable called “timer”.

Create a new variable called "timer"
Step 2 – Make sure you have two backdrops for your stage (The main background for your game and a Game Over background).

timer_BackDrop

Step 3 – Add the following code to your stage:

timer_ScratchAnnotatedCode

 You can download this helpsheet as a pdf: How to create a timer in Scratch

Tagged with: , ,

How to control your Sprite in Scratch…

arrowKeys… using the arrow keys

 

Step 1 – Add the following code to your sprite:

arrowKeys_ScratchStep 2 – If you don’t want your sprite to rotate, click on the blue “i” icon on your sprite. Try these “rotation style” options to find the one you need.

Scratch_SpriteRotation
mousePointer…using the mouse pointer

Instead of using the arrow keys you may prefer your sprite to follow your mouse pointer.
To do so add the following code to your sprite:

mousePointer_Scratch

You can download this helpsheet as a pdf:   How to control your sprite in Scratch

Tagged with: ,

Why are there 1024 bytes in a kilobyte? (instead of 1000)

Here is a good brainteaser when teaching binary code…

Remember: Computers can only work with binary code.

Computers don’t really like the number 1000 because in binary it’s not that straightforward:

binary1000The binary code for 1000 is 1111101000

However computers do like the number 1024 because its binary code is 10000000000.

Binary1024That’s why there are 1024 Bytes in a KB, 1024 KB in a MB and so on…

 

Tagged with: ,

Python Cheat Sheet

Python Cheat Sheet

You can download our Python Cheat Sheet to remind you at all times about the Python syntax.

Python Cheat Sheet

 

 

Tagged with: , , ,

Do you know your <HTML> tags?

HTML Cheat SheetDownload our HTML Cheat Sheet and use it as a reference when working on all your HTML web projects.

Tagged with:

My ASCII Codes…

ASCII TableThe ASCII code is used to give to each symbol / key from the keyboard a unique number called ASCII code. It can be used to convert text into ASCII code and then into binary code. It can be used within your code to identify specific characters in a string or specific keys being pressed on the keyboard.

The ASCII table contains 256 codes (from 0 to 255). You can download our simplified ASCII table that focuses on the most useful ASCII codes.

Tagged with:

101 Computing Challenges

101 Computing Challenges - Book CoverLooking for some inspiration to learn or teach Computing concepts? Fancy a new challenge?

This book is targeted at both learners (from 9 to 99 years old and above) and educators (parents, teachers…) who want to find a challenging end enthusing approach to learn about computing concepts and develop programming skills.

As a learner…

As a learner you will be able to pick up any challenge based on what motivates you and on your current skills. Each challenge has a level of difficulty to help you choose. The learning objectives are clearly identified so that you can focus on a challenge based on the skills you want to develop.

As an educator/teacher…

For educators this book can be used in many different ways. You may be running a computing club and want to find exciting challenges for students to complete together or compete against each other. Alternatively you can decide to focus on one of these challenges with your class and approach it with a more directed step by step approach to help pupils discover new skills. Or you can use some of these challenges as homework tasks. Why not give students one or two of these challenges to focus on during the end of term break.

 

Need dummy data fo fill in your tables?

GenerateDataUsing websites such as www.generatedata.com you can generate large set of dummy data in just a few clicks. You can choose the fields and data types you need and generate a CSV file ready to import into your database or spreadsheet.

 

Tagged with: ,

Can you explain this equation?

JavascriptOperators

== and != are called comparison operators. They are used to compare two values and see whether they are the same (==) or check if they are different (!=). E.g.

if (gender=="Male") alert("You are a man.");
 = is used to assign a value to a variable. E.g.
myFavouriteNumber=5;

 To Sum it up…

An = sign is used to assign a value to a variable: e.g.

var a=3;
a=5+2;

An == sign is used to compare if two values are equal e.g.

if (a==3) {
    alert("a is equal to 3");
} else {
    alert("a is not equal to 3");
}

A != sign is used to compare if two values are different e.g.

if (a!=3) {
    alert("a is not equal to 3");
 } else {
     alert("a is equal to 3");
 }

 

Tagged with: ,