A program calculates the delivery cost of a package based on its weight.
base_rate = 5.50
def calculate_delivery(weight):
package_fee = 1.20
if weight > 10:
total = (weight * base_rate) + package_fee
else:
total = (weight * base_rate)
return total
Study the code above.
Identify the name of one local variable.
20 exam-style questions on Edexcel IGCSE Computer Science Data types and structures. Each one has a worked solution and a mark scheme showing where the marks go.