πŸ”– Background Information

There is no background information for this activity.

🎯 Problem Statement

Write a calculator that takes a list of numbers as a string argument and returns their sum. For example, the argument β€œ1,2,3” would return the number 6 while the argument β€œ4;7;8” would return the number 19.

βœ… Acceptance Criteria

  • The calculator should be able to handle zero, one, or many numbers in the string argument.
  • If a user passes in an empty string, the calculator should return 0.
  • You can assume that the numbers passed into the calculator are all integers.
  • The calculator should sum all of the numbers in the string argument.
  • I can delimit the numbers in the string argument by commas or semicolons.
  • Use assert statements to test your code.

πŸ“‹ Dev Notes

In this activity, we will be using a strategy called β€œping pong” pair programming. In this setup, two people pair with each other while sharing a computer. Partner A writes an assert statement based on the acceptance criteria outlined above. Then, partner B makes that assert statement pass with the minimal amount of code possible. Afterwards, the partners switch (partner B writes a test and partner A makes it pass). Repeat this process until the password validator function has been implemented.

Think about how you might break this problem down into tiny pieces so that you can solve it effectively!

πŸ–₯️ Example Output

N/A

πŸ“˜ Works Cited

N/A