Title: Programming Languages
Course: Quiz Statistics Report Test Course

Q: In programming, a function is
- a recognised code instruction that the interpreter understands
- a custome written piece of code that makes your code work faster
- for adding two objects together
- a binary number conversion facility
- a class of syntax error
A: a recognised code instruction that the interpreter understands

Q: In computing, a string is ...
- a sequence of text characters including numbers and punctuation
- a sequence of numbers
- a sequence of alphanumeric characters only
- a sequence of floating point numbers
- a sequence of binary numbers
A: a sequence of text characters including numbers and punctuation

Q: A line in a program that looks like this:

# This program says hello and asks for my name.

is used to
- Inform others who might look at your code what it is that your code is trying to do
- Make your program execute more quickly
- It is to convert an integer to an interpreter
- print the message Hello on the screen and then ask a name
- reduce the number of syntax errors in the program
A: Inform others who might look at your code what it is that your code is trying to do

Q: A program that understands the instructions that you write is called
- interpreter
- editor
- program installer
- language convertor
- operating system
A: interpreter

Q: While Python includes many built-in functions, some functions exist in separate programs. These have to be imported.

eg.

>>>import random

What are these called?
- modules
- components
- extensions
- units
- random units
- The python native library
A: modules

Q: Sometimes it is necessary to use an older version of a programming language, eg. using python 2.77 instead of python 3.3

Why might this be true?
- Some legacy modules only work with older versions of the programming language
- The new version of the programming language might have bugs in it
- The new version might be a target for malware
- Some people don't like change and prefer to stick with the older system that they've always used
- It can be more complicated to use the newest version of a programming language
A: The new version might be a target for malware
Partly right: Some people don't like change and prefer to stick with the older system that they've always used (20%); It can be more complicated to use the newest version of a programming language (20%)

Q: Which of the following would create a random value between 1 and 20?
- number = random.randint(1, 20)
- import random.randint(0, 20)
- import random.randint(1, 20)
- random = randint(1, 20)
- number = random.randint; 1, 20
- number = random.randint(0, 20)
A: number = random.randint(1, 20)