• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 7 pages
Exam (elaborations)

Tma02_Tm111

Document preview thumbnail
Preview 2 out of 7 pages

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 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 from CourseH on :25:57 GMT -05:00 D) Question 2 This study source was downloaded by from CourseH on :25:57 GMT -05:00

Content preview

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 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

Document information

Uploaded on
January 13, 2023
Number of pages
7
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
FLOYYD12
5.0
(1)
Sold
1
Followers
1
Items
272
Last sold
3 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions