Uploaded by ike kells

ICTD121 exams 2020

advertisement
UNIVERSITY OF EDUCATION, WINNEBA
COLLEGE OF TECHNOLOGY EDUCATION, KUMASI
DEPARTMENT OF INFORMATION TECHNOLOGY EDUCATION
END FIRST SEMESTER EXAMINATION, JUNE 2020
COURSE TITLE
INTRODUCTION TO PROGRAMMING
COURSE CODE
ICTD112
DURATION
LECTURER
WILLIAM ASIEDU
INSTRUCTION(S) ANSWER ALL QUESTIONS
 Make sure you write your name and index number
 Provide your Answer(s) below each questions
 Remember to submit it online (through LMS) ON or
BEFORE 11:49PM - Monday -29/11/2020
INDEX NUMBER
: ____________
NAME
: ____________
SECTION A: DRY RUN
10 marks
Start
Let N=0
Let Sum=0
N=N+1
Sum=Sum+N
No
Is N=10?
Yes
Display Sum
Stop
Use the flowchart above to determining the values of N and SUM when you “dry run” the
flowchart above. Write the values of N and SUM in the space provided below
ITERATION
Iteration 1
Iteration 2
Iteration 3
Iteration 4
Iteration 5
Iteration 6
Iteration 7
Iteration 8
Iteration 9
Iteration 10
N
0
SUM
0
SECTION B:
ANSWER All QUESTIONS
50 MARKS
1. Write an algorithm to accept two numbers, divide the first number by the second
number and display their quotient
2. Write and algorithm that accepts five numbers and displays the sum and average of
the numbers
3. Draw a flowchart to accept the radius and calculate the area of a circle.
4. Write the pseudocode to accept item name, price and quantity from a user and display
the item name and its total value. The total value can be calculated as the product of
price and quantity.
5. Write the pseudocode to accept the age of a candidate. If the age entered is 18 or
above the message ‘You are eligible to vote’ should displayed. If the age entered is
below 18, the message ‘You are not eligible to vote ‘should be displayed.
Download