Skip to content
MathsGenie logo
Open app

Course home

  1. IGCSE
  2. Computer Science Edexcel
  3. Question bank

Subprograms

EasyMedium
123456789101112131415161718192021222324252627282930
Question 29

A programmer is writing a system to manage sales calculations. Study the following algorithm:

tax_rate = 0.20

def calculate_tax(subtotal):
    tax_amount = subtotal * tax_rate
    return tax_amount

Identify the name of a local variable used in this code.

[1]

Subprograms Questions

  1. IGCSE
  2. /Computer Science
  3. /Subprograms