OpenLLM-France/wikimedia huggingface dataset:
# A-level Physics (Advancing Physics)/Metals/Worked Solutions

1. Would you expect a metal to have more or less conductivity than a semiconductor? Why?
A metal has more conductivity than a semiconductor because a metal has more ions than a semiconductor, and hence more free (delocalized) electrons.
2. How can the stress-strain graph for a metal be explained in terms of ions in a sea of electrons?
In the elastic region, the ions are held together by the charge between them and the electrons, and they can move apart when under stress. Then, once the ions are too far apart, the bonds aren't strong enough to pull them back together, so the metal entends under the stress. Eventually, the bonds cannot maintain the structural integrity of the metal any more, so the metal 'necks' in one place, and then the metal fractures.
3. As a metal heats up, what happens to its conductivity? Why?
As a metal heats up, both ions and electrons vibrate more. This means that the collision rate between ions and electrons goes up, so it is harder for electrons to travel through the metal. So, as a metal heats up, its conductivity goes down.
# A-level Physics (Advancing Physics)/Large Units/Worked Solutions

1. What is one parsec in m?
206265 AU x 150 x 10$^9$ = 3.09 x 10$^{16}$m
2. Convert 3 light days into km.
c = 3 x 10$^5$kms$^{−1}$
3 x 3 x 10$^5$ x 24 x 60 x 60 = 7.78 x 10$^{10}$km
3. Convert 5.5 parsecs into light years.
1 ly = 9.46 x 10$^{15}$m
5.5 pc = 5.5 x 3.09 x 10$^{16}$m = 1.70 x 10$^{17}$m
Divide by 1 ly in metres to get a final answer of approximately 18ly.
4. The difference in angle of a star on the perpendicular to the plane of the Earth's orbit which passes through the Sun when viewed from either side of the Earth's orbit is 0.1°. How far away is the star in parsecs?
The angle between the perpendicular and the line which goes through the Earth is 0.05° = 180". So, the star is 1/180 pc away.
# BlitzMax/Language/Data Types

All constants, variables, functions and expressions have an associated type. BlitzMax supports the following types:
| Description | Syntax | Minimum value | Maximum value |
| 8 bit unsigned integer | Byte | 0 | 255 |
| 16 bit unsigned integer | Short | 0 | 65535 |
| 32 bit signed integer | Int | -2^31 | +2^31-1 |
| 64 bit signed integer | Long | -2^63 | +2^63-1 |
| 32 bit floating point | Float | (+/-)10^-38 | (+/-)10^38 |
| 64 bit floating point | Double | (+/-)10^-308 | (+/-)10^308 |
| 16 bit unicode string | String | - | - |
| Object | Typename | - | - |
| Array | ElementType [ ] | - | - |
| Function | ReturnType ( Parameters ) | - | - |
| Pointer | ValueType Ptr | - | - |
| Variable | VariableType Var | - | - |
Integers are used to store simple numeric data without any fractional part. Unsigned integers can only store positive values, while signed integers can store both positive and negative values.
Floating point values are used to store numeric data which may have a fractional part.
Strings are used to store sequences of characters: letters, punctuation, digits and so on. Use strings for storing non-numeric data such as names.
Arrays are used to store sequences of variables. A variable within an array is accessed by 'indexing' the array with an integer offset. Please refer to the arrays sections for more information on arrays.
Objects are instances of user-defined types. Please refer to the user-defined types section.
Comment: Int is used, when data type is omitted, except in SuperStrict mode, where data type must always be specified.

## Type conversions

The following type conversions are performed automatically by BlitzMax when necessary - for example, when assigning an expression to a variable, or when passing an expression to a function:
| Source type | Target type |
| Integer | Floating point, String |
| Floating point | Integer, String |
You can also convert types explicitly using a cast operation. This takes the form of a type specifier followed by an expression in brackets.
Explicit casting allows you to perform the following extra conversions:
| Source type | Target type |
| String | Integer, Floating point |
For example:

## Type balancing

When performing arithmetic operations such as addition or multiplication, it is possible to provide mismatched argument types. For example, the addition operator may be used to add an integer value to a floating point value. But what type should the result be?
BlitzMax decides the result type by balancing the argument types. Both arguments are then converted to the result type before the operator is applied.
The rules governing type balancing are:
      * If either argument is Double, then result is Double
      * else if either argument is Float, then result is Float
      * else if either argument is Long, then result is Long
      * else result is Int
# BlitzMax/Language/Debugging

BlitzMax provides several commands to help with debugging your programs:
      * DebugStop - In debug mode, causes the program to stop executing and activates the debugger. In release mode, no effect.
      * DebugLog StringExpression - In debug mode, causes StringExpression to be printed to the debugger output window. In release mode, no effect.
      * RuntimeError StringExpression - Causes a runtime error exception (see: exceptions) to be thrown with the specified string.
      * Assert Expression Else StringExpression - In debug mode, causes a RuntimeError if Expression evaluates to false. No effect in release mode.
Assert is particularly useful for validating function arguments. For example:
However, since asserts are taken out in release mode, be careful that your asserts don't have any 'side effects' - code that may affect the execution of the program.
# BlitzMax/Language

This document describes the core BlitzMax programming language.
For users who already have BASIC programming experience, the BASIC compatibility section highlights the major differences between BlitzMax and other BASIC dialects.
For general command reference, please see the modules documentation.

## Language
#### Core Topics

   * Constants
   * Strings
   * Collections
   * Literals
   * Conditional Compiling
   * Project Management
   * Variables
   * Comments
   * Exceptions
   * Functions
   * Expressions
   * Slices
   * Debugging
   * Arrays
   * Modules
   * Data Types
   * Objects
   * BASIC Compatibility
   * Identifiers
   * Program Flow
   * User Defined Types

#### Advanced Topics

   * Interfacing with C
   * Memory Management
   * Pointers

## External links

* Website of Open Source BlitzMax NG
http://www.blitzmax.com Former official BlitzMax Website (defunct)
# BlitzMax/Language/Comments

Comments are chunks of text in your program code that are ignored by the compiler, but are there to remind you how the code works.
BlitzMax support single line comments using the ' character - for example:
Multiline comments are also supported, using Rem and End Rem - for example:
# BlitzMax/Language/Collections

BlitzMax offers simple support for managing collections of objects, and for visiting each object in a collections using a special form of For/Next loop.
The simplest kind of collection is an array:
Each iteration of such a loop will assign the next array element (starting with element 0) to the index variable before executing the body of the loop. This allows you to 'visit' each array element in turn.
It is also possible to create your own kind of collection with user defined types.
To do this, you must create a user defined type with a method named ObjectEnumerator which takes no parameters and returns an object. The object returned by this method must itself have the following methods:
You can then use the object in a For/Next loop:
# BlitzMax/Language/Conditional Compiling

Conditional compiling allows you to turn compiling on or off from within your program depending on the environment the program is being compiled for.
Conditional compiling works a bit like an If statement, but takes the form:
       ?Identifier
The ? must appear at the start of a new line, and Identifier should be one of the following:
| Name | Meaning |
| Debug | True if program is being compiled in debug mode. |
| Threaded | True if program is being compiled in threaded mode. |
| Win32 | True if program is being compiled for the Windows operating system. |
| MacOS | True if program is being compiled for the MacOS operating system. |
| Linux | True if program is being compiled for the Linux operating system. |
| X86 | True if program is being compiled for the Intel CPU. |
| PPC | True if program is being compiled for the PowerPC CPU. |
| MacOSX86 | True if program is being compiled for an Intel Mac. |
| MacOSPPC | True if program is being compiled for a PowerPC Mac. |
| BigEndian | True if program is being compiled for a big endian CPU. |
| LittleEndian | True if program is being compiled for a little endian CPU. |
Identifier may also be preceded by Not to invert the result.
An ? on its own always turns compiling on.
For example:
# BlitzMax
## History

BlitzMax is a BASIC dialect, and the latest Blitz language by Blitz Research Limited. It is the first to run on multiple operating systems; it runs on Mac OS, Linux and Microsoft Windows. The language is converted to assembler, then assembled - allowing it to be somewhat platform agnostic. From a gaming standpoint this is possible because, unlike earlier versions, BlitzMax can use OpenGL for rendering.
Other major changes from earlier Blitz products are its object-oriented and modular nature.

## Compilation

BlitzMax code is first converted to a low level assembler format, which is then assembled into object code for the target platform. BlitzMax is capable of compiling for Windows, Linux and Mac OS.
Individual files can be linked together through the Import command, thus allowing complex linking structures that can include not only other BlitzMax files (.BMX), but also C source as well as other languages (particularly ObjectiveC on Mac OS).

## Modules

Modules provide the runtime functionality of BlitzMax. They are stored in the mod directory inside the BlitzMax directory, and accessed via the Import and Framework commands. They can include both native BlitzMax code, and code in C or assembler formats.

## References

* User Guide
* Language
* Modules
   * Brl
   * Pub
   * MaxGUI

## External links

* BlitzMax Website
* BlitzMax Community Forums
# BlitzMax/Language/BASIC Compatibility

This section covers some of the differences between BlitzMax and 'classic' BASIC, and introduces features that help overcome some of classic BASIC's shortcomings.

## Strict mode

Classic BASIC allows you to declare variables 'on the fly'. For example, consider a program consisting of:
This program automatically creates 2 local variables: 'k' and 'sum'. However, this behaviour can often lead to unexpected bugs. For example, if you mistyped one of the 'sum' variables, the program would not work as expected. No error would be given - a new variable would simply be created.
By default, BlitzMax will allow you to automatically declare variables like this. However, you can use the Strict command to override this behaviour.
Strict must appear at the top of your program before any actual program code and puts your program into 'strict mode'. Strict mode forces you to declare all variables before use. For example, rewriting the above program in strict mode results in:
If you were to mistype one of the variable names in this program, you would receive an 'identifier not found' error when compiling, allowing you to easily find and correct the problem.

## Arrays

Blitzmax does not support the Dim statement for array creation. Instead, arrays in BlitzMax are real types - they can be passed to functions, returned from functions and placed in variables.
To create a classic BASIC style array in BlitzMax, use a global variable. For example:
Also note that arrays in BlitzMax are not '1 bigger' than their dimensioned size - the 100 element array above contains 100 elements, numbered 0 through 99 inclusive.
BlitzMax also does not support a 'Redim' operation. Instead, you can use slices. For example:

## Goto and Gosub

BlitzMax does not support the Gosub command. Use functions instead.
The Goto command is supported, but only in non-strict mode. Goto labels should be prefixed with a # character. For example:

## Data, Read and Restore

Data, Read and Restore are supported but have been renamed to DefData, ReadData and RestoreData. Data labels must also be prefixed with a # character.

## Object handles

BlitzMax allows objects to be assigned to integer variables, and integer variables to be passed to functions expecting objects. This is mainly for the benefit of beginners, as it reduces the size and complexity of code, but is also great for lazy pro's! For example:
This is achieved using an object handle system, and such handles should be released using the Release command when they are no longer needed. For example:
Failing to release an object handle will result in memory leaks. However, all objects are released at program exit anyway, so for quick 'n' dirty jobs you don't have to bother.

## Type tag shortcuts

When declaring variables and function return types, BlitzMax allows you to use BASIC style 'type tags'. These are as follows:
| Type tag | Equivalent type |
| % | Int |
| # | Float |
| ~! | Double |
| ~$ | String |
For example, a string variable can be declared in two ways:
Mac users whose keyboards do not feature the # character should use 'Alt 3'.
# BlitzMax/Language/Constants

Constants can be used to store values that don't change during the execution of your program.
Constants must be declared in your program before use with the Const command. Declaring a constant means defining a name, type and initial value for it.
The general syntax for declaring a constant is:
       Const Identifier @: Type @= ConstantExpression
For example:
Multiple constants may be declared per Const statement using the comma separator.
If no type is provided for a constant, the constant defaults to being of type Int.
The initial value for a constant may be an expression, but the expression must itself be constant - it may only use other constants or literals and may not use any variables.
# Applied Robotics/Sensors and Perception/Open CV
## What is OpenCV

OpenCV is a powerful free open source computer vision library maintained by Willow Garage that is widely used in image processing and recognition applications. OpenCV is a framework containing routines for image storage and retrieval, video capture, image processing, computer vision algorithms, GUI and windowing, and many other advanced features. From basic image thresholding to 3D stereo vision, OpenCV usually has a solution for most computer vision needs. OpenCV currently supports many platforms (Linux, BSD, Windows, and MacOSX) and supports bindings for the C, C++, and Python languages. OpenCV is notably faster at image processing than MATLAB in most cases but requires an application built around using the OpenCV library. OpenCV is also available as a ROSpackage in Robot Operating System. More information is available at the OpenCV website.

## How to Install/Build OpenCV for C/C++

Windows: In a Windows environment, OpenCV can be installed for both the Microsoft Visual C++ compiler or MinGW. The VC++ package is easiest to install and comes in a precompiled binary available: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.4/OpenCV-2.4.4.exe/download. This install requires that Microsoft Visual Studio be installed, which is available as a free download from Microsoft (Express Edition): http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-desktop
The full version of MS Visual Studio is available via student Dreamspark accounts accessible via the College of Engineering T.E.A.C.H. webpage.
Linux, Android, MacOSX, non VC++ Windows Compilers: Most other supported platforms require building OpenCV from source files. Full instructions and methods of obtaining the source code can be found in the official OpenCV install guide.
# Applied Science AQA/Atomic Structure
## Topic Title
### Setting Applied context

Scientists working in any area of chemical industry or research require a firm understanding of atomic structure and electron configurations and their use in providing the fundamental basis for chemical structures and reactions. Radiographers, environmental chemists and archaeologists all make use of specific isotopes in their work. Analytical chemists use UV/visible spectra and flame emission spectra to help characterise substances and colorimetry as a quantitative analytical technique. The origin of colour in compounds is of great importance in the dye-, pigment-, and paint-based industries and to development chemists researching new products.
* Syllabus Content
* •    atomic structure in terms of protons, neutrons and electrons, and their relative charges and relative masses
* •    the terms atomic (proton) number (Z), mass number (A), isotope, isotopic abundance
* •    electron configurations for atoms and ions up to Z = 36 in terms of shells
* •    the origin of coloured flame emission spectra and of colour in transition metal compounds in terms of electron transitions
* calculating relative atomic mass, relative molecular mass and relative formula mass in terms of $^{12}$ C.

### Exploration of key ideas (must be original text, not C&P) – level checked by AQA

In general, point students towards the approach to take, as opposed to just giving them information.

#### What's in an atom

The nucleus...
Orbitals...

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Study Task

Work to do to understand this topic e.g. research, analysis

### Careers and Organisations

Carry out some research into these jobs in this area. (Feel free to add other jobs you find.)
| Research these roles: | What are the benefits of this role to society? | What organisations would employ someone in this role?  (Where would they work?) | What would someone in this role have to do within the organisation? | What scientifically-related skills do they need to have?  What techniques do they need to have mastered? | What experience is needed to undertake this role and its responsibilities within an organisation? | What other science personnel will they work with in their organisation. |
| Job 1 | | | | | | |
| Job 2 | | | | | | |

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
click to reveal answer

### Exam-style questions

– can we use old AQA qs… e.g. from more than 5 years ago? With Examiner comments
click to reveal answer

### Links

to other sections within this book
to good external websites (including AQA website, wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Cell Structure
## Topic Title
### Setting Applied context

Cell biologists explore the development and functions of cells and their related systems and interactions. Their work may include developing and testing new pharmaceuticals, diagnosing and screening diseases, testing foods and cosmetics to ensure their safety, developing fertility treatments, and carrying out cancer research, neurological research, genetic engineering, or embryology.
* Syllabus Content
* •    the ultrastructure of eukaryotic and prokaryotic cells on electron micrographs, to include nuclei, smooth endoplasmic reticulum (SER), rough endoplasmic reticulum (RER), mitochondria, vesicles, lysosomes, Golgi apparatus, chloroplasts, vacuoles, cell walls, ribosomes (70S and 80S), flagella, nucleoid, plasmids, mesosomes, pili, slime capsules
* •    the differences between eukaryotic and prokaryotic cell structure
* •    the functions of nuclei, SER, RER, mitochondria, vesicles, lysosomes, Golgi apparatus, chloroplasts, vacuoles, cell walls, ribosomes, flagella, nucleoid, plasmids, mesosomes, pili, slime capsules
* •    nucleic acid structure (DNA/RNA)
* •      calculating magnification or object size using: magnification = observed size /actual size

### Exploration of key ideas (must be original text, not C&P) – level checked by AQA

In general, point students towards the approach to take, as opposed to just giving them information.

#### DNA

DNA or Deoxyribonucleic acid is a helix structure that contains the genetic instructions that are used in growth, development, reproduction and functioning of all living organisms and viruses.

#### Concept 2

explanation 2

#### Concept 3

explanation 3

#### Concept 4

explanation 4

### Study Task

Work to do to understand this topic e.g. research, analysis

### Careers and Organisations

Carry out some research into these jobs in this area. (Feel free to add other jobs you find.)
| Research these roles: | What are the benefits of this role to society? | What organisations would employ someone in this role?  (Where would they work?) | What would someone in this role have to do within the organisation? | What scientifically-related skills do they need to have?  What techniques do they need to have mastered? | What experience is needed to undertake this role and its responsibilities within an organisation? | What other science personnel will they work with in their organisation. |
| Job 1 | | | | | | |
| Job 2 | | | | | | |

### Relevant practical/s

– relating to criteria skills

### Quick questions

Example:
quick questions
click to reveal answer

### Exam-style questions

– can we use old AQA qs… e.g. from more than 5 years ago? With Examiner comments
click to reveal answer

### Links

to other sections within this book
to good external websites (including AQA website, wikipedia, relevant applications / companies) - also considering links in spec

### References / Bibliography

of recommended text books
including mapped refs to existing books
Back to Contents
# Applied Science AQA/Authors Page

Hello - thank you for showing an interest in this project.
If you are a teacher of AQA Applied Science L3Cert (Applied General), you've probably noticed that there's no text book in the offing.
So - let's make our own - if we can write a couple of pages each, we can get it done.

##### How can you join in?

Register a Wikibooks Account - look top right.
Go to the Contents page for this book.
Click on 'edit' and add your name as author to a page.
Save the page (publish it).
Click on the link for the page you have said that you will write.
Edit it - I've put a basic template in. Have a look at a completed page for an example.
(1. If you think there's too much content for one page - split it... or ask me to.)
(2. If you mangle up the template, I've put a spare one here - just copy and paste it.)
(3. It took me a couple of days to work out how to edit a Wikibook... I'll write some pointers here.)
David