1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Writing Functions in Python

Connected

अभ्यास

Returning functions for a math game

You are building an educational math game where the player enters a math term, and your program returns a function that matches that term. For instance, if the user types "add", your program returns a function that adds two numbers. So far you've only implemented the "add" function. Now you want to include a "subtract" function.

निर्देश

100 XP
  • Define the subtract() function. It should take two arguments and return the first argument minus the second argument.