You are on page 1of 2

HiLCoE

School of Computer Science and Technology


Computer Programming

Worksheet I
1. Define the following terms:
Computer programming Algorithm
Programmer SDLC
Programming paradigm Compiler
Programming languages Assembler
Develop an algorithm for each of the following problems. Use flowchart and pseudocode
method of developing an algorithm.
An algorithm that:
2. Converts a mark for a course to its corresponding letter-grade. (You may set your
own scale for the grading)
3. Checks if a number is EVEN or ODD.
4. Counts and displays the number of even and odd occurrences in a given list of
integers.
5. Finds the minimum and maximum of two given numbers.
6. Finds the minimum and maximum numbers from a given list of numbers.
7. Searches for the Greatest Common Divisor (GCD) of two natural numbers.
8. Searches for the Least Common Multiple (LCM) of two natural numbers.
9. Converts a decimal number to its binary equivalent.
10. Finds the number of days in a month of the Gregorian calendar.
11. Displays the next day’s date, given today’s date.
12. That accepts two numbers and displays the product, sum, and difference of the
two numbers.
13. That reads a number and print the sum of the integers up to the number, i.e.
1 + 2 + 3 + 4 + . . .+ n
14. That reads a number n and prints 2n .
15. What does the following algorithm, described using a flow chart, do? Give the
pseudocode of the algorithm.

1
Start

Sum=0

i
1 10
1

Input x

Sum=x + Sum

Avg = sum/10

Print avg

End

16. What are the two phases in problem solving using computers? Describe each
phases in detail.
17. Describe compiled languages Vs. interpreted languages.

You might also like