DTE t2y9 Flashcards

(30 cards)

1
Q

What is an algorithm?

A

An Algorithm is a set of steps you must follow to achieve an outcome

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

What is a variable?

A

A variable is a named placeholder in memory that can store information/data and can be changed. OR it is a container that holds a value

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

What are some examples of variables?

A
  • A score or current level on game called score
  • A mobile phone number called mobileNumber
  • A name called firstName; surname
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the types of variable names?

A

The names that you give a variable is important. Variable names must be meaningful and descriptive. A variable with two word can be used as:
camelCase
kebab-case
snake_case

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

What are the 4 variable guidlines?

A
  • cannot start variable name with number
  • Cannot start with an uppercase letter
  • Cannot have spaces
  • Must be unique
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an integer?

A

Any whole number such as -17, 2, 10

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

What is a float?

A

A decimal number because the decimal point “floats” such as 5.4, 0.2

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

What is a character?

A

A single alpha character such as: H, &, #

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

What is a string?

A

A series of characters such as book name, heading or address

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

What is a date?

A

Anything such as 5/05/2025

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

What is time?

A

generally in 12 hour clock

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

What are the two types of an algorithm?

A

Flowchart and pseudocode

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

What is pseudocode?

A

plain language description of steps in an algorithm

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

What are the six keyword groups of psuedocode?

A
  1. BEGIN, END
  2. INPUT
  3. OUTPUT or PRINT or DISPLAY
  4. IF, THEN, ELSE, END IF
  5. FOR, TO, DO, NEXT, ENDFOR
  6. WHILE, ENDWHILE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the rule in writting key words of pseudocode?

A

They must be bold and capital

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

What are + used for in pseudocode?

A

Plus signs are not maths they are just used for linking words together.

17
Q

What is * used for in pseudocode?

A

Multiplication

18
Q

What is the % used for in pseudocode?

A

It is called modules and it means when you divide by a number what is the remainder. For example, 5 % 2 is one remainder.

19
Q

What is the == mean in pseudocode?

A

It means if something equals that. It is not directly assigning it to a value like a normal = would do but it is saying IF it equals that.

20
Q

What does <> mean in pseudocode?

A

Not equivalent to

21
Q

What does AND mean in pseudocode?

A

Both sides of the equation must be true

22
Q

What does OR mean in pseudocode?

A

Either side of the equation must be true

23
Q

What does NOT mean in pseudocode?

A

When something isn’t true

24
Q

What are the two types of iteration?

A

Fixed loop and not fixed loop. A fixed iteration is telling the computer specifically how many times you want it to loop. You can also have a not fixed iteration where you can create a variable iteration so while the variable is true it will continue to loop through

25
Explain JavaScript
JavaScript is the way in which a website works. So html is the structure, css is the style and javascript is how it runs.
26
What is console log in JavaScript and how is it written?
Console log is a JavaScript function that outputs messages to the console. To type console log you would put: console.log("whatever you want to output");
27
What is an alert in JavaScript
An alert is a popup on the screen that can say a certain message. For example: alert ( "hello world"); would have a pop up message that says hello world
28
How do write comments in JavaScript?
A comment is ignored and not read my a computer. //this is a single line comment /* any thing between this is part of a comment */
29
How do you create a variable in JavaScript?
var name; var score; This is creating different variables that hold certain info You can also assign these variables like: var name = Ruth;
30