"""calc.py: A simple calculator."""

import sys

def add_all(nums):
    return sum(nums)

def multiply_all(nums):
    return reduce(lambda a, b: a * b, nums)

if __name__ == '__main__':
    command = sys.argv[1]
    nums = map(float, sys.argv[2:])
    if command == 'add':
        print(add_all(nums))
    elif command == 'multiply':
        print(multiply_all(nums))
    elif command == 'min':
        print(min(nums))
    else:
        usage = "calc.py [add|multiply] NUM1 [NUM2 [NUM3 [...]]]"
        print(usage)

"""calc.py: A simple calculator."""

import sys

def add_all(nums):
    return sum(nums)

def multiply_all(nums):
    return reduce(lambda a, b: a * b, nums)

if __name__ == '__main__':
    command = sys.argv[1]
    nums = map(float, sys.argv[2:])
    if command == 'add':
        print(add_all(nums))
    elif command == 'multiply':
        print(multiply_all(nums))
    elif command == 'min':
        print(min(nums))
    else:
        usage = ("calc.py [add|multiply|min]"
                 " NUM1 [NUM2 [NUM3 [...]]]")
        print(usage)

Update usage string for min
Update usage string for min

  """calc.py: A simple calculator."""
  
  import sys
  
  def add_all(nums):
      return sum(nums)
  
  def multiply_all(nums):
      return reduce(lambda a, b: a * b, nums)
  
  if __name__ == '__main__':
      command = sys.argv[1]
      nums = map(float, sys.argv[2:])
      if command == 'add':
          print(add_all(nums))
      elif command == 'multiply':
          print(multiply_all(nums))
      elif command == 'min':
          print(min(nums))
      else:
-         usage = "calc.py [add|multiply] NUM1 [NUM2 [NUM3 [...]]]"
+         usage = ("calc.py [add|multiply|min]"
+                  " NUM1 [NUM2 [NUM3 [...]]]")
          print(usage)
  
Update usage string for min
## Code Before:
"""calc.py: A simple calculator."""

import sys

def add_all(nums):
    return sum(nums)

def multiply_all(nums):
    return reduce(lambda a, b: a * b, nums)

if __name__ == '__main__':
    command = sys.argv[1]
    nums = map(float, sys.argv[2:])
    if command == 'add':
        print(add_all(nums))
    elif command == 'multiply':
        print(multiply_all(nums))
    elif command == 'min':
        print(min(nums))
    else:
        usage = "calc.py [add|multiply] NUM1 [NUM2 [NUM3 [...]]]"
        print(usage)

## Instruction:
Update usage string for min
## Code After:
"""calc.py: A simple calculator."""

import sys

def add_all(nums):
    return sum(nums)

def multiply_all(nums):
    return reduce(lambda a, b: a * b, nums)

if __name__ == '__main__':
    command = sys.argv[1]
    nums = map(float, sys.argv[2:])
    if command == 'add':
        print(add_all(nums))
    elif command == 'multiply':
        print(multiply_all(nums))
    elif command == 'min':
        print(min(nums))
    else:
        usage = ("calc.py [add|multiply|min]"
                 " NUM1 [NUM2 [NUM3 [...]]]")
        print(usage)
