Computer Science > Quiz > TM111 TMA 02 Z3528700.doc (All)
a. - Green Flag is clicked - oak_sticker_list is cleared - space bar is pressed - user is asked to enter pupil name - the input “Ines” is stored in the variable “name” - user is asked how... many tree species were found - the user input “18” is stored in the variable tree_species_count - the variable tree_species_percentage is defined by multiplying the variable tree_species_count by 5 - display the variable tree_species_percentage to user - add variable name to oak_sticker_list b. i. 75% is a constant in this script because it will never change. It isn’t relying on variables or data to change its value. ii. A good name for the constant could be Benchmark, Threshold, or Total. Make sure it’s capitalized. (Constants always Capitalized :) ) c. d. This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 01:03:28 GMT -05:00 https://www.coursehero.com/file/146412188/TM111-TMA-02-Z3528700docx/ i. ii. An alternative method to solving this program is by using 3 if then else blocks stacked on each other. It is better to use a nested loop than using 3 if then else statements, because it will run through the parameters much more efficiently. 2. This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 01:03:28 GMT -05:00 https://www.coursehero.com/file/146412188/TM111-TMA-02-Z3528700docx/ 3. A) - Ask user for input - Set input to variable “current_name” - Repeat until position of character = the length of the string - If current letter is in N-Z - Then change position by 1 - Else set new_word to join the character of the current_word - Change position by 1 - Display new_word B) This study source was downloaded by 100000831777157 from CourseHero.com on 07-24-2022 01:03:28 GMT -05:00 https://www.coursehero.com/file/146412188/TM111-TMA-02-Z3528700docx/ C) Test Number Test Purpose Inp [Show More]
Last updated: 1 year ago
Preview 1 out of 6 pages
TM111 TMA 02 Z3528700.doc Bundle
By Topstudies 1 year ago
$25
5
Connected school, study & course
About the document
Uploaded On
Jul 24, 2022
Number of pages
6
Written in
This document has been written for:
Uploaded
Jul 24, 2022
Downloads
0
Views
180
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·