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)
77 views
15 pages
Ict1511 2017 6 e 1
Introduction to Programming Unisa
Uploaded by
gerryrushway
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 ICT1511-2017-6-E-1 (2) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
77 views
15 pages
Ict1511 2017 6 e 1
Introduction to Programming Unisa
Uploaded by
gerryrushway
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 ICT1511-2017-6-E-1 (2) For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save ICT1511-2017-6-E-1 (2) For Later
You are on page 1
/ 15
Search
Fullscreen
i FINAL % FINALE: hd U N 1 SA ICT1511 May/June 2017 INTRODUCTION TO PROGRAMMING ‘STUDENT NUMBER / STUDENTENOMMER 0 FRE Total - 100 I Date of ‘amination, WARNING , carci who without autonsaton takes ro the examination venue any book document of object Which could assist hm inthe samtion and does not hand oer such matonal to he megiato Before the fica commencement ol Ure enarnewon Wal Gs guy of De fo punrmant as dotomined by Cound 2 Rough work may ba dane cry on he axamnaten question paper and must be abeled ns Such 3. Norte may be mage on any pat ote body, ugh the hands oon ay garment M Ths pagelpaper s he propo ofthe Unvarty and under no creumslances may tne cangidats ein tor take tout of he examination venue iB PLEASE COMPLETE THE ATTENDANCE REGISTER ON THE BACK PAGE, TEAR OFF AND HAND TO THE INVIGILATOR inning te Unverstys Sxaranatian sglaions and valUNIVERSITY EXAMINATIONS UNIVERSITEITSEKSAMENS UNISA Ise 1CT1511 May/June 2017 INTRODUCTION TO PROGRAMMING Duraton 2 Hours 400 Marks EXAMINERS. FIRST MS ME VAN HEERDEN SECOND MRS 10 SCHOLTZ Programmable pocket calculator 1s permissible Closed book examination This examination question paper remains the property of the University of South Africa and may not be removed from the examination venue This paper consists of 9 pages + Appendix A (pp 10 - 13) INSTRUCTIONS 1 Make 100% sure you are writing the correct examination paper 2. CHECK the module code on the front page to ensure you are writing the correct examination paper 3 Answer question 1, 2, 3, and 4 in Appendix A 4 All rough work must be done on the back of this question paper and in the answer book 5. The mark for each question is indicated in brackets next to the question GOOD LUCKvcrisi Maydune 2017 Question 1 — True/False 15) Indicate whether the statement is true or false 1. A sentential value is a value that is not legitimate data value for a particular problem, but it is proper type, that ts used to check for a ‘stopping value’ 2 In cases where quite a number of files are used at different stages in the program, it is very important to keep open all the files that are in use at all times. 3 While solving a problem, two variables may have the same name. 4. Anelement in an array need not have an initial value 5. Indicate if the following statement is true of false m+7>3*pwherem=4andp=5 6. The data type of the value returned by a function must be the same in all the return statements when a function contains an if statement In some cases, a loop control variable does not have to be initialized. 8 Indicate if the following statement ts true or false a+t<> (a+b) * 4 where a=6,b=19 andt = 22 9 Intermediate variables may be used to assist with calculations. 10.When different operators are combined in one expression, all the mathematical operators will be processed first, then the relational operators and finally the logical operators 11 Its important to appreciate that each nested IF statement is designed to eliminate the potential answers until there's only one result left 12. The position of an element in an array 1s called an index or a subscript 13 The way that data ts stored in a file determines the type of file it is 14 The key word “together”, in an arithmetic expression indicates that addition will take place 15. The name of the value returned by the function need not be the same as in the calling statementlorisis Mayltune 2017 Question 2 - Multiple Choice 15} Identify the choice that best completes the statement or answers the question. 1 Which of the ‘if’ statements below is the correct one for the following problem statement? To earn a medal in a competition, a participant must cycle at least 20 kilometers and swim 500 meters a if cycleDist <= 20 AND swimDist <= 500 then display “July qualifies for a medal” else display “July does not qualify for a medal” endif b if cycleDist >= 20 AND swmDist >= 500 then display “July qualifies for a medal” else display “July does not qualify for a medal” endif c. if cycleDist > 20 AND swimDist > 500 then display “July qualifies for a medal” else display “July does not qualify for a medal” endif if cycleDist > 20 AND swimDist > 500 then display “July qualifies for a medal” else display “July does not qualify for a medal” endif a rom how many places in the code can a procedure be called? s Many times as needed3 > Cu 4 rors Mayisune 2017 Which of the ‘if’ statements below Is the correct one for the following problem statement? Dabanior wants to go to the dance, the tickets cost R60 and he must take a date (use a Boolean value for this). Display a message to indicate whether he can go a if money >= 60 AND date then display “Dabarior may go on his date” endif if money >= 60 AND NOT date then display “Dabarior may go on his date” endif if money >= 60 AND if date then display “Dabarior may go on his date” else display “Dabarior may go on his date” endif c ifmoney <= 60 AND date then display “Dabanor may go on his date” a else display “Dabanor may go on his date” endif dif money <= 60 AND date then display “Dabarior may go on his date” else display “Dabanor may go on his date” endif The way that 1s stored in a file determines the type of file it 1s a information b byte c data d All of the above Mapping of files 1s managed by a file metadata b. page table c. virtual memory d file system5 rorssit Mayvune 2017 6 What would be the displayed as the monthly increased salary in the following pseudocode if the user enters the department as “c” and the annual salary as 50000? if anSalary 1s numberic then monSalary = anSalary / 12 if deptCode = “A” then monSalary = monSalary + monSalary * 0 072 else if deptCode = “B” then monSalary = monSalary + monSalary * 0 068 else monSalary = monSalary + monSalary * 0 063 endif endif display “The increased monthly salary is R”, monSalary else display “The annual salary must be numeric ” endif a The increased monthly salary is R53150 00 b The increased monthly salary is R4429 17 c The increased monthly salary is R4450 00 d. The annual salary must be numeric ~ How many times would “Hello World” be displayed when the following is executed? ShowHelloWorld a=0 display “Hello World” do while a <5 display “Hello World” asa+1 loop end a? bé cs d none (Phncaton ot6 erist: MayiJune 2017 8 Aprogram contains an array that holds all the names of the days of the week Which of the following ts true? a The highest subscript is 6 b The highest subscript is 7 c The lowest subscript ts 1 d The highest subscript is 12 9 The following equation would result in an answer of x= 38 (45 mod 2) + 99\2-16*2 a 36 b 55 © 104 d 110 10 When you ask multiple questions before an outcome is determined, you create a condition. a dual-alternative b nested ¢ single-alternative d_ compound 11. How would you set up the following arithmetic equation? Maria bought 10 notebooks costing 5 Rand each and 5 pens costing 2 Rand each How much did Mana pay? a payment = notebooks + pens b payment = (notebook * 5) + (pens * 2) ¢. payment = (notebook + pens) * 5 * 2 d_ none of the above 12 Objects often need to hold ___ about themselves. a scope b. information member d reference 13 ____ are the charactenstics that define an object a Instances b Attnbutes c Behaviors d Methods7 orssis MaylJone 2517 14 Which of the following ts not true about count controlled and sentinel- controlled loops? a. While loops are the natural implementation choice for sentinel-controlled loops b A loop cannot be both count-controlled and sentinel controlled ¢ Ifthe number of iterations for a loop depends on certain condition or event becoming true, then one should use a sentinel-controlled loop d_Ifone knows exactly the number of iterations for a loop, then one should use a count-controlied loop 15. How many times would “Programming ts fun” be displayed when the following 1s executed? ProgramminglsFun x=2 y=3 do x=x+1 do while y <=5 display “Programming is Fun” y=y+2 loop display “Programming is Fun” loop until x = 6 display “Programming 's Fun” end a7 b6 cs d_ infinite Question 3- Completion [15] Complete each statement. 1 Test data must include a sample of every category and must also be 2. A group of related characters that conveys meaning is called a 3. Lines can be read from a file until the character is found, which indicates that the file doesn’t contain any data that has not been read. 4A is made up of several fields 5 Inanif statement the clause Is executed when the condition is not TRUE8 sorts Mayllune 2017 Encapsulation is an OOP feature that is possible by making use of the access specifier o 7. The 1s the steps to solve a problem and the pseudocode Is the way in which these steps are expressed 8. Each case !s followed by one or more statements that are executed if the value of the case matches the value of the statement's expression 9. The value of result will be when the following nested for loop has finished executing. for x = 4 to 0 step -2 fory =x to 7 step 2 result =x +y next y next x 40 Programming often involves a set of instructions a number of times 11 To achieve the intended results, the programmer compiles a set of to test the logic 12 Post-test loops evaluate a loop condition located at the of a loop body. 13. The symbol is used to indicate exponentiation 14. The value of answer will be __ when the following nested for loop has finished executing 30 for w 1 to 5 step 2 fory=1tow answer =a+b-y +2 b=b-4 next y next W 15 When working with arrays, you can use in several ways To hold the size of an array, as the array values, and as a subscriptrossi Mayltune 2017 Question 4 [55] The price of hiring a car per day from the Reliable Car Hire Company depends on the type of car the customer hires The customer ma choose between small (S), medium (M) and large (L) cars as shown below Size of car | Dally price in Rand Ss 100 M 260 L 400 The user is asked to enter the type of car he or she needs as well as the number of days it will be hired. Calculate and display the total amount the customer has to pay, using a nested if statement At the moment, there 1s a special offer of a 12.5% discount for hiring a small car Display error messages if user enters Incorrect data. Complete the planning and IPO provided in Appendix A, write the algorithm to solve the problem Use the following test data and provide the output Type of car Number of days Small 4 Large 3 Grand 9 Medium K Paver od10. rersst Mayne 2017 Appendix A Question 1 - True/False Question 2 - Multiple Choice Mark correct choice with X Mark correct choice with X 1[T IF 1] af[bfela 2)/T/ F 2) a b c d 3 T F 3 a b c d (egeact( cio Ea a4|al|pf[el|d 5 T FE 5 a b e | d 6 T F | 6 a b eid 7 T FE 7 a b c d 8 T F 8 a b c qd 9|TlF 9{ajfetfeld | 10 | T | F wo[a[bf[eld ial T F "1 a b c d 12 T F 12 a b c d 13 T F 13 a b c d 14 | T F 14 a b c d 1s | T|F wilal[btfela Question 3 - Completion - Write down the correct phrase onlyrorssis Mayne 2017 Question 4 [55] Description Type Variable name | Input / Output ee Input Processing Outputroristy Mayliune 2017lortsit Mayidune 2017 o UNISA 2017(rea IIDC Examination ponoe — ‘Student number | Sumame Fist Names Subject cate ot pour L_ [fe umber of oper Contre Date ‘This sto cerfy that I have read the nles govemng he examsnations as Set out on Ue inde ‘cover of ths examination ansiver book and in the examnation instruchons That the information supplied by re 9 ths answer book s correct and vale {undertake to adhere to the procedures, rules and requialions ofthe Unversity of South Afnca as published inthe official brochures attendance register (university copy) UNISA Signature of candidate 10 Number I I Batch No 28O0QO1SMCD sonore of nvataor a TI UWS gators personel number by the lnvgiator NOTE Not a vad documant it not complet Filln/MCQ. Examaation penod i ao t fi stutent number [_]
You might also like
Solution Manual For Problem Solving and Programming Concepts 9 E 9th Edition 132492644 PDF
PDF
0% (1)
Solution Manual For Problem Solving and Programming Concepts 9 E 9th Edition 132492644 PDF
6 pages
Ict1511 2018 10 e 1
PDF
No ratings yet
Ict1511 2018 10 e 1
21 pages
Ict1511 2019 10 e 1
PDF
No ratings yet
Ict1511 2019 10 e 1
15 pages
Ict1511 2018 6 e 2
PDF
No ratings yet
Ict1511 2018 6 e 2
11 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
ICT1511-19-S1 - Assisgnment 2 Questions
PDF
No ratings yet
ICT1511-19-S1 - Assisgnment 2 Questions
19 pages
Grade 5 ICT ControlStructures Worksheet
PDF
No ratings yet
Grade 5 ICT ControlStructures Worksheet
6 pages
Class 9 Computer First Terminal Examination 2023-24
PDF
No ratings yet
Class 9 Computer First Terminal Examination 2023-24
4 pages
PRINCIPLES OF PROGRAMMING Past Questions
PDF
No ratings yet
PRINCIPLES OF PROGRAMMING Past Questions
9 pages
Computer Science
PDF
No ratings yet
Computer Science
7 pages
Programming Techq Past Question
PDF
No ratings yet
Programming Techq Past Question
6 pages
MCQs
PDF
No ratings yet
MCQs
19 pages
Mymodules - ICT1511-19-S1 - Online Assessment
PDF
No ratings yet
Mymodules - ICT1511-19-S1 - Online Assessment
18 pages
Class 6 Computer CH 8 Worksheet
PDF
No ratings yet
Class 6 Computer CH 8 Worksheet
3 pages
CS201 MCQs Mids 2024 Mam Mehwish
PDF
No ratings yet
CS201 MCQs Mids 2024 Mam Mehwish
53 pages
Final Exam
PDF
No ratings yet
Final Exam
21 pages
7 1 Programming Techniques 3mtdyhh8JvDrfQ3K
PDF
No ratings yet
7 1 Programming Techniques 3mtdyhh8JvDrfQ3K
44 pages
TCS Most Important Questions
PDF
100% (4)
TCS Most Important Questions
53 pages
Amcat - 8 - C
PDF
No ratings yet
Amcat - 8 - C
2 pages
INTRODUCTION TO CODING..And Are You Idiot
PDF
No ratings yet
INTRODUCTION TO CODING..And Are You Idiot
12 pages
Computer (A I) New
PDF
No ratings yet
Computer (A I) New
5 pages
CS Test 1 - Memo Problem - Solving and Design
PDF
0% (1)
CS Test 1 - Memo Problem - Solving and Design
7 pages
p2 Comp 1
PDF
No ratings yet
p2 Comp 1
20 pages
Computer Programming Questions
PDF
67% (15)
Computer Programming Questions
147 pages
2210 - 02 - Status Basic - Program Design 2024
PDF
No ratings yet
2210 - 02 - Status Basic - Program Design 2024
6 pages
ICG511S 2023 First Opportunity Memorandum Final
PDF
No ratings yet
ICG511S 2023 First Opportunity Memorandum Final
11 pages
ICSE Class 10 Computer Applications Sample Paper
PDF
No ratings yet
ICSE Class 10 Computer Applications Sample Paper
2 pages
Avm Computer Prelim Paper
PDF
No ratings yet
Avm Computer Prelim Paper
8 pages
10-Cta Fte Ay 2023-24
PDF
No ratings yet
10-Cta Fte Ay 2023-24
5 pages
ITPLA1 - B11 2023 Slide Deck Week 3-Students
PDF
No ratings yet
ITPLA1 - B11 2023 Slide Deck Week 3-Students
71 pages
Final PF Question
PDF
No ratings yet
Final PF Question
4 pages
Week 3.1
PDF
No ratings yet
Week 3.1
49 pages
HHW 11 CS 202425
PDF
No ratings yet
HHW 11 CS 202425
5 pages
12 An2 C11 Comqp
PDF
No ratings yet
12 An2 C11 Comqp
3 pages
Revision Answers
PDF
No ratings yet
Revision Answers
5 pages
Design of Computer Final Revision
PDF
No ratings yet
Design of Computer Final Revision
20 pages
Computer Model Papers
PDF
No ratings yet
Computer Model Papers
9 pages
2024S FE-B Questions
PDF
No ratings yet
2024S FE-B Questions
32 pages
Class 10 Preboard1
PDF
No ratings yet
Class 10 Preboard1
6 pages
ICT1511-19-S1 - Assignment 1 Questions
PDF
No ratings yet
ICT1511-19-S1 - Assignment 1 Questions
19 pages
Computer Programming Exam Answer Keys
PDF
No ratings yet
Computer Programming Exam Answer Keys
6 pages
Sample Paper - 2015 Class - X Subject - Maths: Other Educational Portals
PDF
No ratings yet
Sample Paper - 2015 Class - X Subject - Maths: Other Educational Portals
3 pages
Sample Papers 1 - 3 Computer by Devraj Singh
PDF
No ratings yet
Sample Papers 1 - 3 Computer by Devraj Singh
16 pages
Mock Exam Paper Practical
PDF
No ratings yet
Mock Exam Paper Practical
19 pages
Adobe Scan 28-Jan-2025
PDF
No ratings yet
Adobe Scan 28-Jan-2025
25 pages
Cs201 Quiz 1 File by Vu Topper RM
PDF
No ratings yet
Cs201 Quiz 1 File by Vu Topper RM
45 pages
Kratikapaper
PDF
No ratings yet
Kratikapaper
8 pages
Sxcs X Sem1 2021
PDF
No ratings yet
Sxcs X Sem1 2021
5 pages
Final Exam (C++) - 1
PDF
No ratings yet
Final Exam (C++) - 1
5 pages
Intro To Programming Assignment 3
PDF
No ratings yet
Intro To Programming Assignment 3
35 pages
8525 1B QP ComputerScience G 15may24 PM
PDF
No ratings yet
8525 1B QP ComputerScience G 15may24 PM
44 pages
Solved MCQs ch#6
PDF
No ratings yet
Solved MCQs ch#6
3 pages
D. Null Operator
PDF
100% (2)
D. Null Operator
49 pages
Computer Application Class 9 2024 Question Paper
PDF
No ratings yet
Computer Application Class 9 2024 Question Paper
6 pages
Adobe Scan 7 Nov 2024
PDF
No ratings yet
Adobe Scan 7 Nov 2024
5 pages