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