TM111 Introduction To Computing 1 TMA02/TM111 TMA02
46 views 0 purchase
Course
TMA02_TM111.
Institution
TMA02_TM111.
Question 1
A)
-The user is asked to enter a child’s name. Their input, “Jamil”, is stored in the variable child_name.
-The user is asked to enter an amount of trip money in £. Their input, 20, Is stored in trip_money
-The variable trip_money is then passed through an if statement to ...
A)
-The user is asked to enter a child’s name. Their input, “Jamil”,
is stored in the variable child_name.
-The user is asked to enter an amount of trip money in £. Their
input, 20, Is stored in trip_money
-The variable trip_money is then passed through an if
statement to determine if there is any difference
-The variable trip_money is less than the desired amount of
24.95, so it goes into the loop. The difference is then set to
24.95-trip_money, which results in the difference being set as
4.95
B)
i) the second part of the trip_money if statement. The cost of
the trip
ii) trip_cost
iii) beforehand, you could be asked to declare the cost of the
trip, and that value is stored in the If loop
C)
This study source was downloaded by 100000847097152 from CourseHero.com on 11-05-2022 07:25:57 GMT -05:00
, D)
Question 2
This study source was downloaded by 100000847097152 from CourseHero.com on 11-05-2022 07:25:57 GMT -05:00
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller FLOYYD. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $11.99. You're not tied to anything after your purchase.