TM111 TMA02. EXAM-with 100% verified solutions-2023update TM111 TMA02. EXAM-with 100% verified solutions-2023update TM111 TMA02 * Question 1 What the script will do when the spacebar is pressed it record the name of th
...
TM111 TMA02. EXAM-with 100% verified solutions-2023update TM111 TMA02. EXAM-with 100% verified solutions-2023update TM111 TMA02 * Question 1 What the script will do when the spacebar is pressed it record the name of the pupil and how many books they have read, then work out their reading percentage. we were hoping for something like: … Their input, 12, is stored in the variable books_read. The variable percentage_read is set to the value of books_read multiplied by 5 (or to the percentage equivalent of books_read) which in this case is 60. The user is told the percentage of books read (60%). The script then checks whether 60 is less than 70 and finds it is so the pupil's name, 'Frank', is added to low_reading_list. 0/4 Since the value 12 was given you can use exact values, percentages etc. for a clear example. *1b Value of the constant is BOOKS, as we know there are 20 and this doesn’t change. *1c BOOKS would be an appropriate name for the constant. I will accept this answer. 2/2 chosen constant and you adhered to formatting conventions. Screen shot of low & satisfactory below This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 Crop screencopies to what we neeed. 4/5 Well done, you even initialized the second list. I deduct 1 mark for leaving too many test- variables hanging around. *d Below all 3 high, satisfactory and low reading 6/7 You even initialized the third list. Good logic from initialization, selection to output. But too may variables around that are not used. . *d (ii) Input the information without the use of percentages and used lesser than and greater than symbols to get the same result or use 3 “ifs” instead on “if” and “else” brackets/ 2/2 nice alternative and explanation. * Question 2 This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 Clearly unfinished code and inexplicable attempts to merge the flutter and sink blocks back into the main code-block? The code does not work correctly because of the rounding not resulting in exact matches the result is always “sink”. 1/8 I was disappointed how you formed and displayed the incorrect answer using flawed techniques. You did show you understand loops, but you raised concerns by merging defined blocks back into the codebase. 1/12 I was disappointed how you arrived at the wrong actions. You kept flutter in tact, but partially re-merged it and created sink_down using parts of the define in the main block using music, but without using costumes, backdrops etc.. *Question 3 Algorithm – Input word, replace vowels from word with dollar sign and output word. Make new word with vowels replaced by dollar sign Output new word. *b This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 Unfinished code. Does not meet the requirements. Does show initial inkling of understanding of coding. Should look something like: 02/11 program including, input, but most of the logic not close to meeting requirements. *Question 4 *a Test number Test purpose Existing data Expected result This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 Unsorted list Pigeonholes 1 Length of unsorted list in less than number in unsorted list List contents 4 2 8 1 3 7 List contents 8 Empty items 2 Sorted numbers in unsorted list into their counterparts in pigeonhole list 4 2 8 1 3 7 1 2 3 4 7 8 3 To see the number of comparisons between list items needed to find largest number in unsorted list 1 2 3 4 7 8 1 2 3 4 5 6 2/2 two realistic tests. *b This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 First list sorted from the unsorted list to pigeonhole list. *b ii Next list moved to the sorted list. 7/7 for c_pressed. That block just works and works correctly. Congrats. *c This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00 Length of unsorted list 6 should start with 10 20 30 40 Number of comparisons between list items needed to find largest number in unsorted list 5 9 19 29 39 The list appears to be linear as it grows at a steady pace yes. ii Largest number in unsorted list 8 10 20 30 40 Number of comparisons between items in 7 19 29 39 pigeonhole and empty string should be: 10 20 30 40 This table also appears to be linear yes 2/4 for partially correct tables and answers. *d The amount of comparisons to find the largest number (100) of a set of 50 numbers would be (n=50) x (n=50)/2 = 1250 comparisons. 0 for Pigeonsort as it doesn’t do comparisons as a sorting algorithm. selection sort of 50 items would need 50 x (50 -1)/2 = 1225 comparisons. ii Yes this is true as pigeonsort doesn’t take the time to compare numbers with numbers in a list in order to find the answer of which is the largest. no it is only sometimes true. Not for very large numbers. iii 1 possible disadvantage of piegeonhole sort is that it doesn’t work with decimal numbers only whole positive, negative and zero numbers. yes 2/6 for 2 correct answers. This study source was downloaded by from CourseH on 07-12-2022 04:39:25 GMT -05:00
[Show More]