TM111 Bloc
stored in
gold_medal_list is deleted, when a space key is pressed is asked to the
user to enter the pupil’s name and points.
The data
... [Show More] stored in the variable name stored the pupil’s name that
user input, the variable points_score store the pupil points and the
variable points_percentage store the pupil percentage, the list used is the
gold_medal_list and store the percentage data just if the pupil have more
than 80%.
In this situation if the pupil has a percentage more than 80% will be
awarded with a gold medal and the data will be stored on a list.
1b.
1. The numerical value in this program that might appropriately be
stored in a constant is 80
2. The name for the constant I have chosen is MAX_PERCENT
c.
This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 00:59:02 GMT -05:00
https://www.coursehero.com/file/103744046/TMA02-J6776255docx/
d.
ii.
I could have grouped together the commands that have same value
in ‘if points_percentage > or=’.
So, if the value was 80 the commands would show as being under one
main ‘if’ command.
Question 2.
2a. and 2b.
This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 00:59:02 GMT -05:00
https://www.coursehero.com/file/103744046/TMA02-J6776255docx/
Question 3.
a.
First Draft:
Input the new word
Check if the new word contains any consonants, if they have
replaced them with a symbol @
Output the new word with all consonants replaced
Break Down Process
Input the new Word
Repeat until length of word
Set the length of new word
Output the new word
Refine Algorithm
Input the new word
Repeat the length of input word
o Set letter of input word
If not contain vowels, Then
o Replace the letter by @
Output the new word with all consonants replaced by @
Say output word
3b.
This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 00:59:02 GMT -05:00
https://www.coursehero.com/file/103744046/TMA02-J677k 2 Part 1 figure descriptions [Show Less]