Computer Science > EXAM > TM111 Introduction To Computing 1 TMA02/TM111 TMA02 | Questions 1-4 (All)
A. Complete the following step-by-step description of what the script does when the user starts the program with the green flag, then presses their space key, and 'Sami'34enters , and then . Your desc... ription should make clear what data is stored in the variables and the list involved, and the result of any comparison that is made.The user is asked to enter a pupil's name. Their input, 'Sami', is stored in the variable name.The user is asked to enter the number of lengths the pupil can swim....Algorithm Explanation:Green Flag is Clicked - This will delete any existing pupil's name in the "dolphin_badge_list"variableWhen Space Key is Pressed- This will perform the following stepsoWait to enter Pupil's Name - Enter "Sami"Sami will be stored in the variable "name"oWait to enter the number of lengths the pupil can swim - Enter "34"34 will be stored in the variable "number_of_lengths"oPercentage Length is computed multiplying the value of "number_of_lengths"to 2.5The result will be stored in the variable "lengths_percentage"oSay - The program will output the concatenation of the value of "lengths_percentage" and "%"for 2 secondsoIf condition -If the computed "lengths_percentage" value is greater than 75 then"Sami" will be inserted to the "dolphin_badge_list" variabl [Show More]
Last updated: 11 months ago
Preview 1 out of 7 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
by M parkinson · 11 months ago
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Jul 12, 2022
Number of pages
7
Written in
This document has been written for:
Uploaded
Jul 12, 2022
Downloads
1
Views
413
In Scholarfriends, 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 © Scholarfriends · High quality services·