Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Session Cookies
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
16 views
6 pages
Programming Techq Past Question
Programming
Uploaded by
Ron Dany
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save programming Techq past question For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
16 views
6 pages
Programming Techq Past Question
Programming
Uploaded by
Ron Dany
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save programming Techq past question For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 6
Search
Fullscreen
SEPTEMBER, 2019 Candidate's index Number | CSC 102SW PROGRAMMING TECHNIQUES 2 HOURS Signature: UNIVERSITY OF CAPE COAST COLLEGE OF EDUCATION STUDIES SCHOOL OF EDUCATIONAL DEVELOPMENT AND OUTREACH INSTITUTE OF EDUCATION COLLEGES OF EDUCATION FIVE-SEMESTER BACHELOR OF EDUCATION (SANDWICH) PROGRAMME FIRST YEAR, END-OF-FIRST SEMESTER EXAMINATIONS, SEPTEMBER 2019 SEPTEMBER 4, 2019 PROGRAMMING TECHNIQUES 2:30 PM — 4:00 PM SECTION B Answer ANY FOUR (4) questions. 1. Using if-else/if-statements, write a short program in pseudocode that declares an integer variable called Number, input Number, then display "Yes" if Number == 1, display "No" if Number == 2, and display "Maybe" if Number Kwamina and Esi have decided to spend their free Saturday to go to the movies. Their mother insists that they pick a 13-rated movie. Each time they suggest a movie title, she asks them if it is 13-rated. If the answer is NO, they must go back to the list of movies and pick another one. If the answer is VBS, they can go to the movies. Use the case above to construct a Flowchart 3. Construct a flowchart for this program that reflects the following tasks: If(PayRate < 10) AND (Hours > 40) then Set OvertimeHours = Hours ~ 40 Set OvertimePay = OvertimeHours * 1.5 * PayRate Set TotalPay ~ 40 * PayRate + OvertimePay Else Set TotalPay ~ Hours * PayRate End If Page 1 of 24 A. Distinguish between sy B. What will be the output o 10, 8, 3, 2,1 1 Declare Score As Integer 2 Declare Grade As Character 3 Write “Enter Scor: 4. Input Score 5. Select case of Score 6 Case 10 7 Set Grade = "A" 8 Break 9 Case 9 10 Case 8 11. Set Grade="B" 12 Break 13 Case 6 14 Case 7, 15 Set Grade = "C” 16 Break 17 Case 5 18 Case 4 19 Case 3 20 Set Grade="D" 21 Break 22 Case 2 23 Case | 24 Set Grade="E" 25 Break 26 End Case 27 Write “Student Had Grade”+ Grade mntax errors and logic errors. f the code below if a user enters the following number scores: 5. Carefully study the code snippets below and give its output (a) 1 Declare Count As Integer 2 Write "Hello World" 3 For (Count = 5; Count < 4; Count++) 4 Write "Help me please, I'm a prisoner in a For loop!" 5 End For 6 Write "Goodbye" (b) 1 Declare Count As Integer 2 Declare Beans as Integer 3 Set Beans = 4 4 For (Count = 1; Count <= Beans; Count++) 5 Write "You are welcome to UCC programming "+ Count + “class 6 End For Page 2 of 2=) Candidate’s Index Number SEPTEMBER 2019 CSC102SW PROGRAMMING TECHNIQUES 'Stenatura 1 HOUR Lo UNIVERSITY OF CAPE COAST COLLEGE OF EDUCATION STUDIES SCHOOL OF EDUCATIONAL DEVELOPMENT AND OUTREACH INSTITUTE OF EDUCATION FIVE-SEMESTER BACHELOR OF EDUCATION (SANDWICH) PROGRAMME, FIRST YEAR, FIRST SEMESTER QUIZ I, AUGUST 2019 SEPTEMBER 1, 2019 PROGRAMMING TECHNIQUES 1:30 AM — 2:30 AM. Answer all the questions For items 1 to 20, each stem is followed by four options lettered A to D. Read each statement carefully and circle the letter that corresponds to the correct or best option. 1. The program development cycle consists of all the following except ..... A. creating flowchart B. problem analysis C. program coding and debugging it D. program design Which of the following is not a basic control structure? A. The decision structure B. The loop structure C. The process structure D. The sequential structure we Which of the following is not classified as a decision/selection structure statement? A. If-else statement B. If-statement C. Select-case statement D. While-loop statement 4, Flowcharts use special symbols to display pictorially the flow of execution within a program. ‘Symbols used describe all the following except A. decision B. formula C. process D. starvend Page 1 of 45. What will be displayed when the variable Number = -1? If Number <0 Then Write "1" Else End if All B. 2 G3 D. Syntax Error 6. Algorithms can be expressed in all the following ways except .. A. arithmetic equations B. flowcharts C. pseudocode D. words 7. What is displayed when the following program segment is run? A=2,8=4 If (A == 2) AND (8 == 3) Then Write “Statement is true” End if A. “Statement is false” B. “Statement is true” C. Nothing is displayed D. True . Which of the following loop structures is used to repeat a section of code for an unknown number of times until a specific condition is met? A. For loop B. If-else statement C. Infinite loop D. While loop Which of the following expressions will evaluate to true when score = 45? A. score <= 60 AND score <= 100 B. score <= 60 OR score >= 100 C. score >= 60 AND score <= 100 D. score >= 60 OR score >= 100 The following are types of loop structures except A. Do-while loop B. For loop C. If-statement D. While loop Page 2 of 41 phe tak of hall wt thee eninge proryran, sensed ps 1 pl faye te pi, Meas Sin wise, spynepaiy St AE ws A compilation i dehnuulny 1 dep haainent eo WT it CL ie Le ee) r 1 dee tared © Initiglized 1) tinned 14 What will be Mopalnyeed iD Uae Ae beter i eae” 1 int A Declare number £5 Wheger 1, COW number © 1, number - Y epee) A Display Wella Wok 4. tnd Loop 6 td A. Hello Helle VW Hello Number © Helle World 1). Helle World 14. In the expronsion (2 4 4)/4 9 (4 1) whim pron wilh crept Cae At ne c° DT 15. All the following are valid identificrs exams A. dollar B. total ©. total number D. value 4 16. A loop that exists invide the body of aewhtaer lorry io caliee ‘A, do while loop B. inside loop C. nested loop D. while loop 17. Which of the following, is used to determine ter Aes Ge otrucion amie 2 om a executed? A. constant B. counter variable C. float D. identifier Pew bas18. A loop that repeats endlessly because it has no terminating condition is called a(n) A. do while loop B. infinite loop C. nested loop D. while loop 19. What will be displayed if the code below is run? firstNumber = 2, secondNumber = 4 1. Start 2. Declare firstNumber, secondNumber, Average As Integer 3. Display “Prompt user to enter two numbers” 4. Input firstNumber, secondNumber 5. Average = (firstNumber + secondNumber)/2 6. Disploy Average 7.End pop> mas a 0. What will be the output of the following pseudo code? Input f=6,9=9 and set sum=0 Integer n iflo>f) for(n=f:n
You might also like
Final Exam (C++) - 1
PDF
No ratings yet
Final Exam (C++) - 1
5 pages
DPLC Home Economics
PDF
No ratings yet
DPLC Home Economics
94 pages
Lecture 12
PDF
No ratings yet
Lecture 12
68 pages
Lesson 4 PS and PD (Algorithm-IF Construct)
PDF
No ratings yet
Lesson 4 PS and PD (Algorithm-IF Construct)
24 pages
Coordinators Handbook 2
PDF
No ratings yet
Coordinators Handbook 2
236 pages
2024S FE-B Questions
PDF
No ratings yet
2024S FE-B Questions
32 pages
2.1.2 Pseudocode
PDF
No ratings yet
2.1.2 Pseudocode
13 pages
Introduction to C (3)
PDF
No ratings yet
Introduction to C (3)
45 pages
ICT1511-2017-6-E-1 (2)
PDF
No ratings yet
ICT1511-2017-6-E-1 (2)
15 pages
Chapter 8
PDF
No ratings yet
Chapter 8
70 pages
Lec 5 - Problem Solving I DR El Shimaa
PDF
No ratings yet
Lec 5 - Problem Solving I DR El Shimaa
52 pages
2-1-2 Pseudocode and Flowcharts
PDF
No ratings yet
2-1-2 Pseudocode and Flowcharts
13 pages
Term Two Class 3 Questions
PDF
No ratings yet
Term Two Class 3 Questions
16 pages
Homework #07 - Answers: Jatinder Uses Internet Banking. This Pseudocode Checks Her PIN
PDF
No ratings yet
Homework #07 - Answers: Jatinder Uses Internet Banking. This Pseudocode Checks Her PIN
100 pages
Final BIT 112 Principles of Programming Questions 2021-2022
PDF
No ratings yet
Final BIT 112 Principles of Programming Questions 2021-2022
6 pages
Problem Solving 1
PDF
No ratings yet
Problem Solving 1
32 pages
Control Structures
PDF
No ratings yet
Control Structures
36 pages
questions
PDF
No ratings yet
questions
15 pages
10th Computer Guess Paper PDF
PDF
No ratings yet
10th Computer Guess Paper PDF
13 pages
Gov't 24weeks Learning Plan
PDF
No ratings yet
Gov't 24weeks Learning Plan
112 pages
PLC Presentation
PDF
No ratings yet
PLC Presentation
75 pages
C++ Lectures
PDF
No ratings yet
C++ Lectures
23 pages
Unit 8
PDF
No ratings yet
Unit 8
25 pages
COSC101 EXAM 16_17
PDF
No ratings yet
COSC101 EXAM 16_17
2 pages
Exam Grading For JHS
PDF
No ratings yet
Exam Grading For JHS
39 pages
Algorithm Advanced Manual
PDF
No ratings yet
Algorithm Advanced Manual
40 pages
9th ICSE GEMS MODERN ACADEMY FINAL EXAM 2019-20
PDF
No ratings yet
9th ICSE GEMS MODERN ACADEMY FINAL EXAM 2019-20
5 pages
icse-class-9-assessment-2-computer-applications-270225-2025
PDF
No ratings yet
icse-class-9-assessment-2-computer-applications-270225-2025
4 pages
Topic 3.0-3.3 Fundamentals of Programming Language
PDF
No ratings yet
Topic 3.0-3.3 Fundamentals of Programming Language
96 pages
Programming 1B
PDF
No ratings yet
Programming 1B
11 pages
Sebo
PDF
No ratings yet
Sebo
5 pages
02 - Practice Questions of Selection
PDF
No ratings yet
02 - Practice Questions of Selection
2 pages
Computer Science
PDF
No ratings yet
Computer Science
7 pages
Revision Answers
PDF
No ratings yet
Revision Answers
5 pages
Microsoft Word 2013 GREAT
PDF
No ratings yet
Microsoft Word 2013 GREAT
38 pages
SOFTWARE FUNDAMENTALS - Quiz - QA
PDF
No ratings yet
SOFTWARE FUNDAMENTALS - Quiz - QA
15 pages
HNDIT 1103-Structured Programming Q1. (2007 First Semester Exam - Q 1)
PDF
No ratings yet
HNDIT 1103-Structured Programming Q1. (2007 First Semester Exam - Q 1)
5 pages
Question Bank UNIT I
PDF
No ratings yet
Question Bank UNIT I
11 pages
TCS (TATA Consultancy Services) Placement Papers
PDF
No ratings yet
TCS (TATA Consultancy Services) Placement Papers
11 pages
Topic: 2.1.2 Pseudocode and Flowcharts
PDF
No ratings yet
Topic: 2.1.2 Pseudocode and Flowcharts
13 pages
Introduction To Computing
PDF
No ratings yet
Introduction To Computing
5 pages
ICG511S 2023 First Opportunity Memorandum Final
PDF
No ratings yet
ICG511S 2023 First Opportunity Memorandum Final
11 pages
CS Test 1 - Memo Problem - Solving and Design
PDF
0% (1)
CS Test 1 - Memo Problem - Solving and Design
7 pages
Ict - Super Mock
PDF
100% (1)
Ict - Super Mock
8 pages
Midterm2024 Model1 Answer
PDF
No ratings yet
Midterm2024 Model1 Answer
4 pages
p2 Comp 1
PDF
No ratings yet
p2 Comp 1
20 pages
Design of Computer Final Revision
PDF
No ratings yet
Design of Computer Final Revision
20 pages
Ict Jhs 2 Term 1 Lesson Plan Draft 2018
PDF
No ratings yet
Ict Jhs 2 Term 1 Lesson Plan Draft 2018
16 pages
Computer Science SSC-II Solution
PDF
No ratings yet
Computer Science SSC-II Solution
11 pages
Grade 11 - CP 4 Introduction To Problem Solving
PDF
No ratings yet
Grade 11 - CP 4 Introduction To Problem Solving
10 pages
Paper 1 Science
PDF
No ratings yet
Paper 1 Science
7 pages
SSC-II Computer Science (2 Sets With Solutions) - Combined
PDF
No ratings yet
SSC-II Computer Science (2 Sets With Solutions) - Combined
37 pages
Introduction-to-Word - RONDANY BETTER
PDF
No ratings yet
Introduction-to-Word - RONDANY BETTER
13 pages
2210 - 02 - Status Basic - Program Design 2024
PDF
No ratings yet
2210 - 02 - Status Basic - Program Design 2024
6 pages
Word Processor
PDF
No ratings yet
Word Processor
19 pages
PDS LAB 1 Manual
PDF
No ratings yet
PDS LAB 1 Manual
77 pages
1.1.8 Programming Terminologies
PDF
No ratings yet
1.1.8 Programming Terminologies
7 pages
BS 7 Maths
PDF
No ratings yet
BS 7 Maths
5 pages
Final Model Paper Computer Science SSC-II
PDF
No ratings yet
Final Model Paper Computer Science SSC-II
7 pages
TCS Placement Paper 2
PDF
No ratings yet
TCS Placement Paper 2
13 pages
Tata Consultancy Services Sample Test: This Test Consists of 50 Questions - The Set Code For This Paper Is D
PDF
No ratings yet
Tata Consultancy Services Sample Test: This Test Consists of 50 Questions - The Set Code For This Paper Is D
12 pages
Computer Science Ssc-Ii: Answer Sheet No.
PDF
No ratings yet
Computer Science Ssc-Ii: Answer Sheet No.
8 pages
ENGLISH
PDF
No ratings yet
ENGLISH
5 pages
2.1.2 Pseudocode PDF
PDF
No ratings yet
2.1.2 Pseudocode PDF
13 pages
Paper 2: Second Mock Examination (2023) (Objectives and Theory)
PDF
No ratings yet
Paper 2: Second Mock Examination (2023) (Objectives and Theory)
4 pages
English - SUPER MOCK
PDF
No ratings yet
English - SUPER MOCK
8 pages
This Test Consists of 50 Questions - The Set Code For This Paper Is D
PDF
No ratings yet
This Test Consists of 50 Questions - The Set Code For This Paper Is D
11 pages
Problem Solving
PDF
No ratings yet
Problem Solving
90 pages
C Questions
PDF
No ratings yet
C Questions
12 pages
Class 9 Computer Applications (Finals 20-21)
PDF
No ratings yet
Class 9 Computer Applications (Finals 20-21)
5 pages
Pseudocode
PDF
No ratings yet
Pseudocode
33 pages
ICSE Class 10 Computer Applications Sample Paper
PDF
No ratings yet
ICSE Class 10 Computer Applications Sample Paper
2 pages
C C++ Tcs
PDF
No ratings yet
C C++ Tcs
8 pages