More results...

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

Code Breaker Challenges – Series 3

padlock-closed

Crack the Codes! (open full screen)


In this set of challenges, you will analyse some pseudocode to try to get the pass codes required to move on to the next levels. Levels will get more and more complex as your progress through these challenges. Will you be able to crack all the codes?

Tagged with:

Code Breaker Challenges – Series 2

padlock-closed

Crack the Codes! (open full screen)


In this set of challenges, you will analyse some pseudocode to try to get the pass codes required to move on to the next levels. Levels will get more and more complex as your progress through these challenges. Will you be able to crack all the codes?

Tagged with:

Min, Max, Mean, Median and Mod

maths-blackboardIn this Python challenge we will manipulate a list of numbers to calculate the Min, Max, Mean, Median and Mod of all these numbers.

First you may want to refresh your maths skills and check the meaning of these terms: http://www.purplemath.com/modules/meanmode.htm

Our Python code will first generate a random list of numbers.

We then added a few lines of code to calculate the min value. Your task is to complete this code to calculate the max, mean, median and mod values using a similar 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: ,

Code Breaker Challenges – Series 1

padlock-closed

Crack the Codes! (open full screen)


In this set of challenges, you will analyse some pseudocode to try to get the pass codes required to move on to the next levels. Levels will get more and more complex as your progress through these challenges. Will you be able to crack all the codes?

Tagged with:

Computer Networks – Quiz!

Take the Quiz! (open full screen)


Tagged with: ,

Algorithm Terminology – Quiz!

Take the Quiz! (open full screen)


How old will you be in…

In this challenge we will write a Python program to help us find out hold we will be in the coming years! We have designed the algorithm of our program using both a Flowchart and Pseudocode.

Algorithm

FlowchartPseudocode
how-old-flowchart

year = 2017
age = INPUT("How old are you?")
FOR i FROM 1 TO 50
   year = year + 1
   age = age + 1
   OUTPUT("In " + year + ", you will be " + age + " years old.")
END FOR

Reviewing the Algorithm


Check the above pseudo-code and answer the following questions:


?
What variables are used in this code?


?
On what line is iteration used?


?
What value is used to initialise the variable year?


?
On what line is the variable age incremented?


?
On which line is string concatenation used?


?
How many lines will be displayed on screen once this program has been fully executed?


?
What would be the last line to appear on screen once this program has been fully executed?

Check the above flowchart and answer the following questions:


?
In a flowchart, what shape is used to represent a user INPUT?


?
In a flowchart, what shape is used to represent iteration?


?
In a flowchart, what shape is used to represent an OUTPUT?

Python Code


Your task is to use the algorithm provided above (either Flowchart or Pseudo-code) to code this algorithm using Python.

unlock-access

Solution...

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

Tagged with: , ,

Sampling Sound – Revision

sampling-interval-15
Before attempting this task make sure you understand what is meant by sampling sound.
Complete this drag and drop activity to highlight the key concepts of sound sampling.

digital
large
sampling rate
analogue
quality
Hz
milliseconds
bps
measurements
lower
bits
intervals

Sampling Intervals and Sample Rate

  • Sampling sound is the process of converting an sound wave into a signal.
  • When sampling sound, the computer takes of the sound wave at regular .
  • The sampling interval is the number of between two samples.
  • The larger the sampling interval, the the quality and file size of the sound file.
  • The is the number of samples in one second. It is measured in .
  • A sample interval leads to a low sample rate.

Bit Depth and Bit Rate

  • The Bit Depth is the number of used to store one sample into binary.
  • A high bit depth leads to a better sound file.
  • The Bit Rate is the number of bits used per seconds, measured in .
  • A high bit rate leads to a better quality sound file.

Sampling Sound

microphone-sampling-soundSampling is a method of converting an analogue audio signal into a digital signal. While sampling a sound wave, the computer takes measurements of this sound wave at a regular interval called sampling interval. Each measurement is then saved as a number in binary format.

Sampling Interval


The quality and file size of the sound files are linked to the size of the sampling interval (in milliseconds).

Sampling Interval: 15 ms

Sampling Interval: 15 ms

Sampling Interval: 40ms

Sampling Interval: 40ms

A small sampling interval results in a better quality sound file and increases the size of the audio file.

Sample Rate


To describe the quality of a sound file we often use the term sample rate as opposed to the sampling interval.

The sample rate (in Hz) is the number of samples in one seconds.

Sample Rate = 1 / Sampling Interval
Sampling Interval: 15 ms

Sample Rate: 66Hz

Sampling Interval: 40ms

Sample Rate: 25Hz

A small sampling interval results in a high sample rate which results in a better quality sound file and increases the size of the audio file.

Sampling Sound Visualisation using Python


Bit Depth


Bit depth is the number of bits available for each sample. The higher the bit depth, the higher the quality of the audio. Bit depth is usually 16 bits on a CD and 24 bits on a DVD.

Bit Rate


The bit rate of a file tells us how many bits of data are processed every second. Bit rates are usually measured in kilobits per second (kbps). The higher the bit depth, the higher the quality of the audio.

Take the Quiz


Take the Quiz on Sampling Sound

Vanishing Point Perspective

In graphical perspective, a vanishing point is an abstract point on the image plane where 2D projections (or drawings) of a set of parallel lines in 3D space appear to converge. The vanishing point may also be referred to as the “direction point”.

perspective-vanishing-point-1

Vanishing Point Perspective is used in Graphic editing and 3D video games. It can be used to render 3D shapes (3D Buildings and objects), add perspective to a background scene (road, train track) or add shadow effects.

The following slideshow, demonstrates the use of vanishing points in computer graphics:

You can read more about Vanishing Point Perspective on Wikipedia.

Vanishing Point Perspective using python Turtle


Privacy Overview

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

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

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

This website uses cookies to:

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

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

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

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