Create Arithmetic Worksheets

Introduction

Write a program to create arithmetic worksheets and answer keys. (Addition, subtraction, multiplication, division)

Numbers should be randomly generated within a specified range. This allow the user to specify the maximum number of digits in each number. For example, 1 to 999.

With addition problems, the user should be able to specify the number of numbers to be added. (See problem box example below.)

Things to Consider

a. Use only integers.

b. Output worksheets and answer keys as text or PDF files that can be printed.

c. Each worksheet and answer key pair should have a unique code on them so the can be matched up. For example, date/time stamp, random number, both, ...

d. Write the program in a modular form. Use an object or subroutine to create individual problems. For example, an addition problem object or subroutine. If you modularize the program it should be fairly easy to add other problem types.

e. Get the addition worksheet working first then add subtraction, multiplication, and division.

f. Create all of the problems and then output the worksheet and answer key.

g. To format a work sheet, consider each problem as a box, and a worksheet made of problem boxes.

Problem Box
image missing
Worksheet
image missing

h. Use a fixed width font (courier, ...) so things line up correctly.

i. The problem object or subroutine should be able to report how how big it is (columns and rows of characters). For example,
image missing
This will simplify finding the maximum problem box size and formatting the worksheet. (Use a fixed box size for all problems?)

j. For simpler problems only allow

k. Define a minimum lower range limit (0 or 1)

l. Define a maximum upper range limit (9999999)

m. Allow other lower number range limits. For example the range 4-222.

n. Division by zero is not allowed

Design

  1. The program will ask the user for:
    • What kind of problems to generate (addition,subtraction,multiplication,division)
    • Number range (0-99999)
    • The number of problems to generate (2 to 20)
    • For addition, the number of numbers to be added (2 or greater)(maximum of 6?)
    • For subtraction, only positive numbers for answers (yes/no)
    • For division, only whole number for answers (yes/no)
  2. The program will output a worksheet and answer key that can be printed
  3. Error messages will be displayed when bad data is entered

Try This

Allow ranges with negative numbers.
Limit problems to those that do not "carry".
Create a worksheet that has a mixture of problem types (addition,subtraction,multiplication,division)
Create worksheets for simple algebra equations.