Component 2.3 - Programming Languages Flashcards

1
Q

What does HTML stand for?

A

Hyper Text Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why are web standards such as HTML important for programmers?

A

Web standards simplify the development of web pages as web programmers will be able to understand another developer’s code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why are web standards such as HTML important for the end user?

A

Following standards ensures that different web browsers are able to display web pages in the way they were intended

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Shat is HTML?

A

HTML is a standard used for creating web pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the first and second tag in a pair of HTML tags called?

A

1st - opening tag

2nd - closing tag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the text between < html > and < / html > do?

A

This text describes the web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is < head > in HTML?

A

The element is a container for all head elements, including metadata, title for the document, scripts, styles

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What would metadata be used in html for?

A

Metadata is used in html to describe the page, include key words, author of documents, time last altered etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the text between < body > and < /body >tags do?

A

This text includes the contents of the web page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does <p> do?</p>

A

The <p> tag defines a paragraph. Web browsers will add some space before the end for every </p><p> element automatically</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What tags are used to hyperlink an element within a web page?

A

<a> and </a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the tag(s) for displaying an image in html?

A

<img></img>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the tags for headings, bold, italic, centre align, underline in html?

A
Headings - <h1> to <h6>
Bold - <b>
Italic - <i>
Centre align - </i></b>
Underline - <u>

All end with </u></h6></h1>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the <ul> and </ul> tags used for in html?

A

The <ul> tag is used for an unordered list</ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can a bullet point list of elements apples, oranges, pears be made in html?

A

By using the <ul> tag for an unordered list then the <li> tag for each line in the list.

<ul><li>Apples</li><li>Oranges</li>
...
</ul>

</li></ul>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is <blockquote> tag used for in html?</blockquote>

A

The <blockquote> tag is used to specify a section that is quoted from another source. Web browsers will indent <blockquote> elemenets</blockquote></blockquote>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the <hr> tag used for in HTML and what does it stand for?

A

The <hr> (horizontal rule) tag is a single tag (no closing tag) used to separate content in a HTML page (bigger gap)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the difference between assembly code and machine code?

A

Assembley code has the same structure and functions as machine code but it uses mnemonics (names) rather than binary code (1s 0s)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Order Python, hardware, machine code, assembly code, high level languages?

A

Python, high level languages, assembly language, machine code, hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the advantage of assembly level programs?

A

They:

  • require less memory and execution time
  • Allow code to interact directly with hardware (e.g. drivers)
  • Are suitable for time-critical purposes
21
Q

What os unique about machine code and assembly language?

A

Each type of computer has it’s own machine code and assembly language, so a program written in machine/assembly code for one CPU won’t run on another type of CPU

22
Q

What is the assembly mnemonic for the Input instruction and what does it do?

A

INP - Inputs a value and stores in the accumulator

23
Q

What is the assembly mnemonic for the Output instruction and what does it do?

A

OUT - displays the contents of the accumulator

24
Q

What is the assembly mnemonic for the Store instruction and what does it do?

A

STA - transfers a number from the accumulator to RAM

25
What is the assembly mnemonic for the Load instruction and what does it do?
LDA - Transfers a number from RAM to the accumulator
26
What is the assembly mnemonic for the Add instruction and what does it do?
ADD - adds the contents of the accumulator to the contents of the RAM address
27
What is the assembly mnemonic for the Subtract instruction and what does it do?
SuB - subtracts the contents of the accumulator from the contents of a RAM address
28
What is the assembly mnemonic for the Branch instruction and what does it do?
BRA - jump to the specified ram location (for loops)
29
What is the assembly mnemonic for the End/Stop/Halt instruction and what does it do?
HLT - stopps the processor
30
What is the assembly mnemonic for the Data definition instruction and what does it do?
DAT - defines variables (e.g. first DAT, declare first as variable)
31
What is an Object Oriented Programming language?
A programming language involving A collection of objects that communicate to each other
32
What is an Object in an OOP (Object Oriented Programming language)?
An object has states and behaviours
33
What is a Class used for in an OOP (Object Oriented Programming language)?
A class is used to describe one or more objects. It is a plan or template for creating objects within a program
34
What is the rule for naming classes?
Class names must always begin with an uppercase
35
What is a Method in an OOP (Object Oriented Programming language)?
A method is a behaviour, one class can obtain many methods
36
What is the rule for naming methods?
Methods must start with a lower case letter
37
What is an Instance Variable in an OOP (Object Oriented Programming language)?
Instance variables are variables bound to class instances (e.g. game of wombats eating leaves, each wombat has a leaves variable storing the number of leaves it ate independently)
38
What components make up an OOP language?
Objects, classes, methods, instance variables
39
What are the four main properties of OOP languages that reduce the amount of code you need to write?
Encapsulation, Abstraction, Inheritance, Polymorphism
40
What is encapsulation?
Encapsulation is the process of wrapping data and the code that operates on it into a single entity
41
Give an example of encapsulation in OOP languages?
The varaibles and methods are wrapped up in a class
42
What is abstraction in OOP languages?
Abstraction is the process of hiding non-essential features and showing only essential features
43
What is an example of abstraction in green foot?
A wombat's states e.g. name, breed can be hidden but behaviours e.g. burrow are not
44
What is Inheritance? (Part of an OOP language?
Inheritance is a feature of OOP languages that allows a new class to use the properties and methods of an existing class.
45
What is the derived class and base class called? (Inheritance)
``` Derived - the subclass Base class - superclass ```
46
A superclass can have ___ subclasses and a subclass can inherit from __ superclass
Many, one
47
How does inheritance in OOP languages work?
The new derived class (e.g. wombat) inherits the states and behaviours of the existing base class (e.g. Actor)
48
Subclasses can have their own methods and variables in addition to superclasses.
This is a statement not a question
49
What is polymorphism?
Polymorphism is a concept that allows actions to act differently based on the object performing them