More results...

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

3D Molecules

molecule-H2OIn this blog post we will use Glowscript to create a 3D animation representing the molecule H2O.

Our aim is to recreate the molecule by joining three spheres together (one sphere for each atom). We will then create a compound object to join these three spheres together in a single object (our molecule). Finally using an infinite while loop we will animate/rotate the molecule around itself.

Here is our 3D animation: (Use Google Chrome to preview this animation)


Right Click on the animation to change the view point (rotate camera angle).

Find out more…


To learn more about all the instructions you can use in GlowScript/VPython, use this on-line documentation.

Your task:


Can you create and animate a more complex molecule such as the molecule methane: CH4.
molecule-methane
Note: You can also represent links between atoms using cylinders.
unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: , , ,

Question Time – IP Networks

Feeling confident with your computing knowledge of IP Networks?

Watch these video clips about IP Networks and the Internet and spend a few minutes to answer or research the following questions:


?
What are the differences between an IP address and a MAC address?


?
Why is 128.264.107.32 not a valid IP address?


?
Why does the Internet need to be upgraded from IPv4 to IPv6?


?
What is the maximum number of devices that we can connect on the Internet at the same time (using IPv4)?


?
How many unique addresses can we generate using IPv6?


?
How does internet data travel accross the Atlantic Ocean?


?
Does it take longer to download a file from a sever located in Australia or in Europe?


?
Who owns and maintains the data cables (e.g. optic fibres) used by the Internet?


?
Who owns and maintains the Domain Name Servers used by the Internet?


?
Who are ICANN and what do they do? (What’s about Nominet?)


?
Why is packet switching a lot more effective than circuit switching for Internet traffic?


?
What is the typical or average size of a data packet on the Internet when using the HTTP protocol?


?
What is the typical or average size of a data packet on the Internet when using the SMTP protocol?


?
Is packet switching more secure than circuit switching?


?
What are the differences between normal phone calls and voiceOverIP phone calls using services such as Skype?


?
What is the difference between the Internet and the Web?


?
How does Google search the entire web in just a few milliseconds?


?
What is the Google Page Rank algorithm used for and how does it work?

Web Quest

Using the above links can you answer the following questions?

  • Who is your Internet Service Provider?
  • What’s your IP Address?
  • How long would it take for a data packet to reach the BBC.co.uk server?
  • Who booked the domain name twitter.com?
  • When will the domain name facebook.com expire?
  • Where is the whitehouse.gov website hosted?
  • How many routers a request from the UK to Google.com go through?

Tagged with:

3D Animation : Moon Phases

moon-earthIn this blog post we will use Glowscript to create a 3D animation representing how we perceive the moon from Earth throughout its cycle.

Our aim is to represent a 3D sphere and to progressively change the direction of the light using a while loop. At each iteration of our while loop we will increment the angle of the light (theta) by a few radians (omega).

The full cycle means that the theta angle has completed a full circle (2*PI radians), representing 28 days.

We will start the cycle with a new moon (when the moon is not visible).

moon-phases

Here is our 3D animation: (Use Google Chrome to preview this animation)

Find out more…


To learn more about all the instructions you can use in GlowScript/VPython, use this on-line documentation.

Animate 3D Molecules


Check this blog post to see how you can use GlowScript to create and animate 3D molecules!

Tagged with: , , ,

UML Diagrams

By completing the following activities you will learn about the different types of UML diagrams used to design OOP projects (Object Oriented Programming).

You will learn how to draw:

  • Use Case Diagrams,
  • Class Diagrams,
  • Object Diagrams,
  • Communication Diagrams,
  • Sequence Diagrams,
  • State Diagrams,
  • Activity Diagrams.

Click on the following picture to access to the activities:
UML-Diagrams

Tagged with: , , , , ,

Learn SQL

SQL

SQL is a language used to query a database. In other words SQL is used to filter, sort and manipulate data stored in relational databases.

SQL-Definition

By completing the following activities you will learn more about the syntax of SQL and how to use it to manipulate data in a relational database used to store customer details, orders, suppliers, etc.

SQL ActivitiesCreate your own SQL Queries
Tagged with: , , , , ,

Star Wars Quotes

star-wars-quote

Learning Objectives


In this challenge we are learning how to format text on a web page using a range of CSS properties.

Remember the key syntax for CSS is as follows:
css-syntax

In this challenge we will use various CSS properties such as:

  • font-family:
  • font-size:
  • color:
  • font-weight:
  • font-style:
  • text-decoration:
  • text-shadow:

You can learn more about all these CSS properties on w3schools.com.

We will also use different types of selectors such as:

  • TAG
  • .class
  • #id
  • element child-element
  • element child-element:nth-child()

You can learn more about CSS selectors on w3schools.com.

Our first quote


Look at the code below to see how we created our first quote from Master Yoda.

See the Pen Font Title by 101 Computing (@101Computing) on CodePen.

Check how we have used various CSS properties to format the text and to add a glowing effect or a shadow effect to our text.

Also compare the different types of selectors we have used in our CSS code.

Your challenge


Press the “edit on codepen” button on the above codepen.

Tweak the code to create another inspirational quote from the star wars movies, using any of the quotes provided below:

Do, or do not. There is no try.

Master Yoda

Train yourself to let go of everything you fear to lose.

Master Yoda

Fly Casual!

Han Solo

Rawwwaarrgh!

Chewbacca

Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering.

Master Yoda

You must unlearn what you have learned.

Master Yoda

Your focus determines your reality.

Qui-Gon Jinn

There’s always a bigger fish!

Qui-Gon Jinn

Many of the truths that we cling to depend on our point of view.

Obi-Wan Kenobi

Who’s more foolish? The fool or the fool who follows him?

Obi-Wan Kenobi

Nothing will stop us this time.

Darth Vader

Tagged with: , ,

Coding Puzzles

code-puzzle

Complete the following coding puzzles by drag and dropping the lines of codes in the correct order to recreate basic computer programs.

Click on the picture below to access the coding puzzles:
code-puzzle-start

Tagged with: , ,

Understanding Abstraction

In computer science, abstraction is a technique for managing complexity of computer systems. It works by establishing a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level.

In order to create complex computer system, computer scientists have to look at the big picture first to clearly identify the problem they want to solve and progressively elaborate a solution to solve this problem. This is the concept of abstraction, which can be broken down in a few set of steps. Each step enables computer scientists to add more details on how they will solve their problem.

Abstraction Step 1: Problem Definition:


It is essential to clearly identify the problem that we want to solve. To do so it is essential to understand the needs of the end-user and the difference between computerised models and the reality.

abstraction-step-1

For this blog post, we are going to focus on the following problem:
How can we create a computer program used in the Google car to inform the passengers on the directions for their journey as well as to provide them with factual information such as estimated mileage and duration of their journey?

Abstraction Step 2: Identify the inputs and outputs of our solution:

abstraction-step-2

In our scenario we have the following inputs and outputs:

abstraction-step-2b

Abstraction Step 3: Identify the main components of our problem:


In our scenario we have identified four main components as follows:

abstraction-step-3

Abstraction Step 4: Identify potential for code reusability by:


  • Using existing libraries,

  • Defining functions and procedures,

  • Using Object Oriented concepts such as the use of Classes and objects.

abstraction-step-4

Abstraction Step 5: Design the programming algorithms:


Design the algorithms for every element of the solution. These algorithms will be based on the key procedural programming concepts: Sequencing, Selection and Iteration.
These algorithms will also rely on the use of variables and appropriate data structures.

abstraction-step-5

Tagged with:

The Collatz Conjecture

The Collatz conjecture is a famous mathematical mystery that has yet to be solved. It is named after Lothar Collatz a German mathematician, who first proposed it in 1937.

It is based on the following number sequence:

  • Start with any positive whole number called n,
  • if n is even, divide it by 2: n’ = n / 2,
  • if n is odd, multiply it by 3 and add 1: n’ = 3 x n + 1,
  • if n’ = 1 then stop the number sequence,
  • otherwise repeat this process with n’ as your starting number.

Let’s see how this number sequence behaves with some of the following numbers:

Collatz-Conjoncture
These number sequences are known as hailstone sequences because they go up and down just like a hailstone in a cloud before crashing to Earth.

It seems that these sequences always end up reaching an endless cycle: The endless cycle being 4, 2 , 1. (If we carry on, 1 being odd becomes 3 x 1 + 1 = 4).

Collatz-Conjoncture-endless-cycle

An unsolved problem:


The question that these sequences are raising is: Does such number sequences always settle on the 4,2,1 cycle no matter what starting value we use? It is conjectured (but not yet proven) that they will, in other words that each hailstone sequence will always terminate at n = 1.

Experiments certainly suggest that it does. Computers have checked all starting values up to 5 x 260, a number that is 19 digits long, and found that the 4, 2, 1 cycle eventually appears. The trouble is that nobody has been able to prove that this is the case for all starting numbers!

This unsolved mathematical question/unproven conjecture is known as the Collatz conjecture.

Your Challenge


Write a computer program that will implement a hailstone number sequence. Ask the user to input the starting number and display all the numbers generated by the number sequence till you reach the value of 1. Make sure that your number sequence follow the rules listed at the beginning of this blog post.

Extension Task:


Did you use iteration (for instance a while loop) to complete this challenge?

If so do some research about how recursion works. Change your code to swap your loop for a recursive approach.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: , ,

Merry Christmas

merry-christmasFor this challenge we are going to create Christmas Cards using Python turtle.

We will use the random library to create unique cards.

Starry Night


Our first card consists of creating a starry night scene.

This card is using:

  1. A function called draw_star() that takes five parameters: myPen, colour code, x position, y position and size of the star,
  2. Iteration: A for loop to create 15 stars,
  3. x and y coordinates to position the stars on the canvas,
  4. The random library, using the randint() function to randomly position the stars on the canvas.

(X,Y) Coordinates


The canvas we are drawing on (using Python Turtle) is 400 pixels wide by 400 pixels high.
Look at the canvas below to understand how (x,y) coordinates work:

Christmas Tree


Our second card consists of creating a Christmas Tree.

This card is using:

  1. A function called draw_rectangle() that takes six parameters: myPen, colour code, x position, y position, width and height of the rectangle,
  2. Iteration: A while loop to add more layers to the tree till we reach a thin enough top layer,
  3. x and y coordinates to position the rectangles on the canvas,
  4. The random library, using the randint() function to randomly set the width and height the rectangles on the canvas.

Tweak this card:
What’s about adding 20 snowflakes behind this tree, using the draw_circle() function.
Make sure the snowflakes are randomly positioned on the canvas.

Your Challenge


Your challenge consists of creating one of the following three Christmas cards:
xmas-cards

Make sure that your code uses:

  1. The randint() function from the random library to make sure each snowman, tree or hat is unique,
  2. A loop to reduce the number of instructions in your code.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area
Tagged with: , ,