# 6.5 Developing Algorithms Using Pseudocode Flashcards

1
Q
A

Less tham

2
Q

<=

A

Less rhan or equal to

3
Q

>

A

Greater than

4
Q

> =

A

Gretaer than or equal to

5
Q

==

A

Equal to

6
Q

=

A

Assignment

7
Q

!=

A

Not equal to

8
Q

*

A

Multiply

9
Q
A

Exponent

10
Q

+

A

Addition (with int or float)

Concatenation (with strings)

11
Q

If
Else if
Else

A

Branching

12
Q

Switch case default

A

Branch depending on case

13
Q

input(;

A

Get user inout

14
Q

print()

A

Output to the user

15
Q

for

A

Repeat a process for a set number of times

16
Q

while

A

Repeaet while a condition is true

17
Q

do untill

A

Do a loop untill a condition is true

18
Q

str()

A

Cast to string

19
Q

int()

A

Cast to integer

20
Q

INTEGER

A

Whole number

Eg: 1, 2, 3, 4

21
Q

REAL or FLOAT or DOUBLE

A

A number with a decimal point

Eg: 1.1, 1.2, 1.3, 1.4

22
Q

BOOLEAN

A

Either True or False

23
Q

CHARACTER

A

A single alphabetic or numeric character

Eg: ‘A’, ‘@’

24
Q

STRING

A

A sequence of one or more characters

25
Q

LIST or ARRAY

A

A container that conrain more data

Eg: [‘eggs’, ‘are’, ‘good’]

26
Q

DICTIONARY

A

Key value pairs

Eg: {‘name’: marc, ‘age’: 14}

27
Q

Give some boolean operators

A
```>
>=
<
<=
==
!=```
28
Q

100 > 10^2

A

False

29
Q

n^2 == n*n

A

True

30
Q

Pseudocode

A

Structurd english for descriving algorithms

31
Q

Use of pseudocode

A

Allows a programmer to focus on the logic of the algorithm without being dristracted by syntax

32
Q

Sequence

A

The statements are executed one by one, in the order they are written

33
Q

Selection

A

The nest statement to be executed depends on whether the condition being tested is TRUE or FALSE

34
Q

Switch/case

A

Used if there are several options to be tested

35
Q

Assign a integer 5 to the variable x

A

x = 5

36
Q

Assign an input for a person’s username to a variable called y

A

y = input(“What is your name? “)

37
Q

Iteration

A

Repetition

38
Q

Give examples of functions that use iteration

A

For
While
Do untill

39
Q

Write a program that loops from 0 to 6 and prints out those numbers using iteration

A

for i in range(0, 7):

print(i)

40
Q

Write a program that keeps asking for a password if its incorrect

A

password = input(“Enter password”)
while password != “secret”:
print(“incorrect password”)
password = input(“Enter password”)

41
Q

Write a program that keeps asking for a password if its incorrect using a do untill loop

A

do:
password = input(“Enter password”)
until password == “secret”
print(“correct password”)