Title: Math Expressions Direct Answer
Author: Kate Deibel
Date: March 29, 2004
Technique: Direct Answer
Before Class Preparation Time: MEDIUM
Class Completion Time: MEDIUM
In-Class Analysis Time: LOW
Out-Of-Class Analysis Time: LOW
Assessment Goals:
- Develop problem-solving skills
- Improve mathematical skills
- Learn terms and facts
- Learn concepts and theories
- Improve skills at paying attention
Topics:
- Mathematics
- C
- Integer arithmetic
- Associativity
- Precedence
- Types
Purpose:
This activity allows instructors to see if students understand how to simplify arithmetic expressions in C.
Activity:
Simplify the following expressions (remember, these expressions are written in the C language and may not follow conventional mathematical rules):
- (15 / 2) * (3 / 2)
- 15 * 3 / 2 / 2
- 3 / 2 * 15 / 2
- 15 / 2 * 3 / 2
- (15 * 3)/(2 * 2)
- (15.0 * 3) / 2
- (int) (15.0 / 2.0)
- 8 + 7 % 5 - 6
- 6 - -3 * 50 % (48 + 9 / 8)
- (double) 10 / 4
- (double) (10 / 4)
- (int) ((double) 10) / (double) 4 + 1.0
Solution:
- (15 / 2) * (3 / 2) == 7
- 15 * 3 / 2 / 2 == 11
- 3 / 2 * 15 / 2 == 7
- 15 / 2 * 3 / 2 == 10
- (15 * 3)/(2 * 2) == 11
- (15.0 * 3) / 2 == 22.5
- (int) (15.0 / 2.0)
- 8 + 7 % 5 - 6 == 4
- 6 - -3 * 50 % (48 + 9 / 8) == 9
- (double) 10 / 4 == 2.5
- (double) (10 / 4) == 2.0
- (int) ((double) 10) / (double) 4 + 1.0 == 3.0
Instructor Responses:
- Lecture
- Next Day Summary
- Class Discussion
- Small Group Discussions
- Homework
Response Analysis:
The following must be done out of class:
- In a first pass, mark and count the number of incorrect answers.
- For each question that has a significant (your judgement call) of incorrect answers, do the following:
- Look through the answers to these questions.
- Place different incorrect answers in separate piles.
- Attempt to identify the nature of the most common errors that are made.
- Discuss in class these errors in class, using the common mistakes that you identified.
In class feedback can be done by having students write their own answers, but caution must be taken to avoid embarassing or ridiculing a student for making mistakes.
Variant Uses of Activity:
- Have students work in groups to complete this activity. The instructor may want to circulate throughout the groups to ensure that each group is making progress. After the groups have completed the problems, the instructor can ask for volunteers for each problem. Be sure to ask for explanations of the arithmetic.
- Have students work individually on their problems and form a small group to discuss their answers.
Device-Enabled: Straightforward to Enable
Related Topics:
- Order of Operations
- Function Calls
- Simple Data Types
- Built-in Functions
- Logical Expressions