Mathematical formulas and Pseudo Codes Flashcards

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

What is pseudocode?

A

Pseudocode is a high-level description of an algorithm that uses the structural conventions of programming languages but is intended for human reading rather than machine reading.

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

True or False: Pseudocode can be directly executed by a computer.

A

False

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

What mathematical operation does the pseudocode ‘sum = a + b’ represent?

A

Addition

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

Fill in the blank: In pseudocode, a loop can be represented using keywords such as ‘for’ or _____ .

A

while

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

What is the purpose of using pseudocode in programming?

A

To outline algorithms in an easy-to-understand format before coding.

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

Which of the following is a correct pseudocode representation of the formula ‘c = a^2 + b^2’?

A

c = a * a + b * b

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

True or False: Pseudocode requires strict syntax rules.

A

False

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

What mathematical concept does ‘if a > b then’ represent in pseudocode?

A

Conditional statement

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

What does the pseudocode ‘for i from 1 to n’ indicate?

A

A loop that iterates from 1 to n.

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

Fill in the blank: The pseudocode ‘output x’ corresponds to the mathematical operation of _____ .

A

Displaying or printing the value of x

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

What is the equivalent pseudocode for the mathematical expression ‘x = y / z’?

A

x = y divided by z

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

True or False: Pseudocode can include comments for clarification.

A

True

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

What does the term ‘algorithm’ refer to?

A

A step-by-step procedure for solving a problem or performing a task.

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

Which pseudocode structure is used to repeat a block of code a specific number of times?

A

For loop

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

What is the pseudocode representation of the mathematical operation ‘x = sqrt(y)’?

A

x = square root of y

17
Q

Fill in the blank: The pseudocode keyword ‘else’ is used in _____ statements.

A

Conditional

18
Q

What does ‘return value’ in pseudocode signify?

A

It indicates the output of a function or procedure.

19
Q

In pseudocode, how is a variable typically declared?

A

Using the keyword ‘define’ or ‘set’.

20
Q

True or False: Pseudocode can help in understanding complex algorithms.

21
Q

What is the equivalent pseudocode for the mathematical expression ‘z = a * b + c’?

A

z = a times b plus c

22
Q

Which keyword in pseudocode indicates the start of a function?

23
Q

What does the pseudocode ‘while condition do’ signify?

A

It indicates a loop that continues as long as the condition is true.

24
Q

Fill in the blank: In pseudocode, ‘array’ is a data structure that can hold _____ of values.

25
What is the purpose of indentation in pseudocode?
To indicate the structure and flow of control.
26
True or False: Pseudocode can be language-specific.
False
27
What does the pseudocode 'if x < 0 then' imply?
A condition that checks if x is less than zero.
28
Which of the following best represents a mathematical formula in pseudocode format: 'y = mx + b'?
y = m times x plus b
29
Fill in the blank: The 'switch' statement in pseudocode is used for _____ selection.
Multiple
30
What is the equivalent pseudocode for the mathematical expression 'f(x) = x^2'?
f of x equals x times x
31
What does the pseudocode 'end if' signify?
It indicates the conclusion of an 'if' statement.
32
True or False: Pseudocode can include loops and conditionals.
True
33
What is the main advantage of using pseudocode?
It simplifies the process of writing algorithms without worrying about syntax.