Tutorial / Algorithms

Question 1

State characteristics of a good algorithm.

Question 2

What are the advantages of using pseudocode before implementing an algorithm in a programming language?

Question 3

Explain how a flowchart could help identify logic errors in an algorithm before testing it in code.

Question 4

How does the divide and conquer approach simplify the problem-solving process in software design? Provide a real-world example.

Question 5

What are the key differences between desk checking and using a trace table, and when might you use each?

Question 6

A Fibonacci series is a sequence of numbers where each is the sum of the two preceding numbers.

0, 1, 1, 2, 3, 5, 8, 13, 21, 34 and so on

Write an algorithm in which a user enters a number stored in the variable num. The algorithm prints all the numbers in the Fibonacci series less than or equal to the variable num.

Prepare your algorithm in pseudocode and test it with a trace table.

Question 7

Modify and test the algorithm you wrote in Question 6, in which a user is asked to enter the number of terms of the Fibonacci series to be printed.

Question 8

Deduce the purpose of the Python program given by using a trace table.

Question 9

Deduce the purpose of the Python program given by using a trace table.

Question 10

Trace the algorithm below to identify why it does not work with the array alpha_part.

Last updated

Was this helpful?